A library for working with phylogenetic and population genetic data.
v0.27.0
SvgText Struct Reference

#include <genesis/utils/formats/svg/text.hpp>

Detailed Description

Definition at line 47 of file text.hpp.

Public Member Functions

 SvgText (std::string const &text="", SvgPoint const &position=SvgPoint(), SvgFont const &font=SvgFont(), SvgFill const &fill=SvgFill(), SvgStroke const &stroke=SvgStroke(SvgStroke::Type::kOmit))
 
 SvgText (SvgText &&)=default
 
 SvgText (SvgText const &)=default
 
 ~SvgText ()=default
 
SvgBox bounding_box () const
 
SvgTextoperator= (SvgText &&)=default
 
SvgTextoperator= (SvgText const &)=default
 
void write (std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const
 

Static Public Member Functions

static std::string alignment_baseline_to_string (AlignmentBaseline value)
 
static std::string anchor_to_string (Anchor value)
 
static std::string dominant_baseline_to_string (DominantBaseline value)
 

Public Types

enum  AlignmentBaseline {
  kNone, kAuto, kBaseline, kBeforeEdge,
  kTextBeforeEdge, kMiddle, kCentral, kAfterEdge,
  kTextAfterEdge, kIdeographic, kAlphabetic, kHanging,
  kMathematical, kInherit
}
 
enum  Anchor { kNone, kStart, kMiddle, kEnd }
 
enum  DominantBaseline {
  kNone, kAuto, kUseScript, kNoChange,
  kResetSize, kIdeographic, kAlphabetic, kHanging,
  kMathematical, kCentral, kMiddle, kTextAfterEdge,
  kTextBeforeEdge, kInherit
}
 
using self_type = SvgText
 

Public Attributes

AlignmentBaseline alignment_baseline = AlignmentBaseline::kNone
 
Anchor anchor = Anchor::kNone
 
DominantBaseline dominant_baseline = DominantBaseline::kNone
 
std::string dx
 
std::string dy
 
SvgFill fill
 
SvgFont font
 
std::string id
 
double kerning
 
double letter_spacing
 
SvgPoint position
 
SvgStroke stroke
 
std::string text
 
SvgTransform transform
 
double word_spacing
 

Constructor & Destructor Documentation

◆ SvgText() [1/3]

SvgText ( std::string const &  text = "",
SvgPoint const &  position = SvgPoint(),
SvgFont const &  font = SvgFont(),
SvgFill const &  fill = SvgFill(),
SvgStroke const &  stroke = SvgStrokeSvgStroke::Type::kOmit ) 
)

Definition at line 51 of file text.cpp.

◆ ~SvgText()

~SvgText ( )
default

◆ SvgText() [2/3]

SvgText ( SvgText const &  )
default

◆ SvgText() [3/3]

SvgText ( SvgText &&  )
default

Member Function Documentation

◆ alignment_baseline_to_string()

std::string alignment_baseline_to_string ( SvgText::AlignmentBaseline  value)
static

Definition at line 220 of file text.cpp.

◆ anchor_to_string()

std::string anchor_to_string ( SvgText::Anchor  value)
static

Definition at line 166 of file text.cpp.

◆ bounding_box()

SvgBox bounding_box ( ) const

Definition at line 72 of file text.cpp.

◆ dominant_baseline_to_string()

std::string dominant_baseline_to_string ( SvgText::DominantBaseline  value)
static

Definition at line 182 of file text.cpp.

◆ operator=() [1/2]

SvgText& operator= ( SvgText &&  )
default

◆ operator=() [2/2]

SvgText& operator= ( SvgText const &  )
default

◆ write()

void write ( std::ostream &  out,
size_t  indent = 0,
SvgDrawingOptions const &  options = SvgDrawingOptions() 
) const

Definition at line 102 of file text.cpp.

Member Typedef Documentation

◆ self_type

using self_type = SvgText

Definition at line 55 of file text.hpp.

Member Enumeration Documentation

◆ AlignmentBaseline

enum AlignmentBaseline
strong
Enumerator
kNone 
kAuto 
kBaseline 
kBeforeEdge 
kTextBeforeEdge 
kMiddle 
kCentral 
kAfterEdge 
kTextAfterEdge 
kIdeographic 
kAlphabetic 
kHanging 
kMathematical 
kInherit 

Definition at line 83 of file text.hpp.

◆ Anchor

enum Anchor
strong
Enumerator
kNone 
kStart 
kMiddle 
kEnd 

Definition at line 57 of file text.hpp.

◆ DominantBaseline

enum DominantBaseline
strong
Enumerator
kNone 
kAuto 
kUseScript 
kNoChange 
kResetSize 
kIdeographic 
kAlphabetic 
kHanging 
kMathematical 
kCentral 
kMiddle 
kTextAfterEdge 
kTextBeforeEdge 
kInherit 

Definition at line 65 of file text.hpp.

Member Data Documentation

◆ alignment_baseline

Definition at line 156 of file text.hpp.

◆ anchor

Definition at line 154 of file text.hpp.

◆ dominant_baseline

Definition at line 155 of file text.hpp.

◆ dx

std::string dx

Definition at line 162 of file text.hpp.

◆ dy

std::string dy

Definition at line 163 of file text.hpp.

◆ fill

SvgFill fill

Definition at line 151 of file text.hpp.

◆ font

SvgFont font

Definition at line 150 of file text.hpp.

◆ id

std::string id

Definition at line 145 of file text.hpp.

◆ kerning

double kerning

Definition at line 158 of file text.hpp.

◆ letter_spacing

double letter_spacing

Definition at line 159 of file text.hpp.

◆ position

SvgPoint position

Definition at line 148 of file text.hpp.

◆ stroke

SvgStroke stroke

Definition at line 152 of file text.hpp.

◆ text

std::string text

Definition at line 147 of file text.hpp.

◆ transform

SvgTransform transform

Definition at line 165 of file text.hpp.

◆ word_spacing

double word_spacing

Definition at line 160 of file text.hpp.


The documentation for this struct was generated from the following files: