#include <genesis/utils/formats/svg/shapes.hpp>
Definition at line 458 of file shapes.hpp.
Public Member Functions | |
SvgPath (std::vector< std::string > const &elements, SvgStroke const &stroke=SvgStroke(), SvgFill const &fill=SvgFill()) | |
SvgPath (SvgPath &&)=default | |
SvgPath (SvgPath const &)=default | |
SvgPath (SvgStroke const &stroke=SvgStroke(), SvgFill const &fill=SvgFill()) | |
~SvgPath ()=default | |
self_type & | add (std::string elem) |
SvgBox | bounding_box () const |
Compute the bounding box of the path. More... | |
self_type & | operator<< (std::string elem) |
SvgPath & | operator= (SvgPath &&)=default |
SvgPath & | operator= (SvgPath const &)=default |
void | write (std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const |
Public Types | |
using | self_type = SvgPath |
Public Attributes | |
std::vector< std::string > | elements |
SvgFill | fill |
std::string | id |
SvgStroke | stroke |
SvgTransform | transform |
Definition at line 459 of file shapes.cpp.
SvgPath | ( | std::vector< std::string > const & | elements, |
SvgStroke const & | stroke = SvgStroke() , |
||
SvgFill const & | fill = SvgFill() |
||
) |
Definition at line 467 of file shapes.cpp.
|
default |
SvgPath & add | ( | std::string | elem | ) |
Definition at line 481 of file shapes.cpp.
SvgBox bounding_box | ( | ) | const |
Compute the bounding box of the path.
Note that we have not implemented a full svg renderer here. Hence, we only use the immediate coordinates as given in the path commands, but ignore any parts that might go outside of that, such as Bezier curves. Still, this bounding box should give a good enough outline for many purposes, e.g., to scale a group or set the document margins roughly around the path.
Definition at line 492 of file shapes.cpp.
SvgPath & operator<< | ( | std::string | elem | ) |
Definition at line 487 of file shapes.cpp.
void write | ( | std::ostream & | out, |
size_t | indent = 0 , |
||
SvgDrawingOptions const & | options = SvgDrawingOptions() |
||
) | const |
Definition at line 691 of file shapes.cpp.
Definition at line 466 of file shapes.hpp.
std::vector< std::string > elements |
Definition at line 521 of file shapes.hpp.
SvgFill fill |
Definition at line 524 of file shapes.hpp.
std::string id |
Definition at line 519 of file shapes.hpp.
SvgStroke stroke |
Definition at line 523 of file shapes.hpp.
SvgTransform transform |
Definition at line 526 of file shapes.hpp.