A library for working with phylogenetic and population genetic data.
v0.32.0
SvgTransform Struct Reference

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

Detailed Description

Definition at line 238 of file attributes.hpp.

Public Member Functions

 SvgTransform ()=default
 
 SvgTransform (SvgTransform &&)=default
 
 SvgTransform (SvgTransform const &)=default
 
 ~SvgTransform ()=default
 
void append (Transformation &&t)
 
void append (Transformation const &t)
 
SvgBox apply (SvgBox const &b) const
 Apply all transformations to a box, and return the new transformed coordinates. More...
 
SvgPoint apply (SvgPoint const &p) const
 Apply all transformations to a point, and return the new transformed coordinate. More...
 
void clear ()
 
SvgTransformoperator= (SvgTransform &&)=default
 
SvgTransformoperator= (SvgTransform const &)=default
 
void write (std::ostream &out) const
 

Public Types

using self_type = SvgTransform
 

Public Attributes

std::vector< Transformationtransformations
 

Classes

struct  Matrix
 
struct  Rotate
 
struct  Scale
 
struct  SkewX
 
struct  SkewY
 
class  Transformation
 Internal helper class used as an abstraction to be able to store Transformations without need for inheritance and virtual functions within the different transformation types. More...
 
struct  Translate
 

Constructor & Destructor Documentation

◆ SvgTransform() [1/3]

SvgTransform ( )
default

◆ ~SvgTransform()

~SvgTransform ( )
default

◆ SvgTransform() [2/3]

SvgTransform ( SvgTransform const &  )
default

◆ SvgTransform() [3/3]

SvgTransform ( SvgTransform &&  )
default

Member Function Documentation

◆ append() [1/2]

void append ( Transformation &&  t)

Definition at line 353 of file attributes.cpp.

◆ append() [2/2]

void append ( Transformation const &  t)

Definition at line 358 of file attributes.cpp.

◆ apply() [1/2]

SvgBox apply ( SvgBox const &  b) const

Apply all transformations to a box, and return the new transformed coordinates.

As our implmentation is not a full svg renderer, we cheat here and just transform the corners of the box. That means, with rotations etc, there could be parts of an object where this model fails us. Note that we transform all four corners, and hence compute a box that is too large under rotations.

Still, this is good enough for our puposes of determining the rough outlines of objects, so that we can scale the document around them.

Definition at line 374 of file attributes.cpp.

◆ apply() [2/2]

SvgPoint apply ( SvgPoint const &  p) const

Apply all transformations to a point, and return the new transformed coordinate.

Definition at line 363 of file attributes.cpp.

◆ clear()

void clear ( )
inline

Definition at line 682 of file attributes.hpp.

◆ operator=() [1/2]

SvgTransform& operator= ( SvgTransform &&  )
default

◆ operator=() [2/2]

SvgTransform& operator= ( SvgTransform const &  )
default

◆ write()

void write ( std::ostream &  out) const

Definition at line 394 of file attributes.cpp.

Member Typedef Documentation

◆ self_type

Definition at line 246 of file attributes.hpp.

Member Data Documentation

◆ transformations

std::vector<Transformation> transformations

Definition at line 691 of file attributes.hpp.


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