SVG for C++
|
Base class for any SVG elements that have a width and height. More...
#include <svg.hpp>
Inherits SVG::Element.
Inherited by SVG::Circle, SVG::Line, SVG::Path, SVG::Rect, and SVG::SVG.
Public Member Functions | |
operator Point () | |
virtual std::vector< Point > | points () |
virtual double | x () |
virtual double | y () |
virtual double | width () |
virtual double | height () |
Public Member Functions inherited from SVG::Element | |
Element (const Element &other)=delete | |
Element (Element &&other)=default | |
Element (const char *id) | |
operator std::string () | |
template<typename T , typename... Args> | |
T * | add_child (Args &&... args) |
template<typename T > | |
Element & | operator<< (T &&node) |
template<typename T > | |
std::vector< T * > | get_children () |
template<typename T > | |
std::vector< T * > | get_immediate_children () |
Element * | get_element_by_id (const std::string &id) |
std::vector< Element * > | get_elements_by_class (const std::string &clsname) |
void | autoscale (const Margins &margins=DEFAULT_MARGINS) |
void | autoscale (const double margin) |
virtual BoundingBox | get_bbox () |
ChildMap | get_children () |
template<> | |
Element::ChildList | get_immediate_children () |
Public Member Functions inherited from SVG::AttributeMap | |
AttributeMap (SVGAttrib _attr) | |
template<typename T > | |
AttributeMap & | set_attr (const std::string key, T value) |
template<> | |
AttributeMap & | set_attr (const std::string key, const double value) |
template<> | |
AttributeMap & | set_attr (const std::string key, const char *value) |
template<> | |
AttributeMap & | set_attr (const std::string key, const std::string value) |
Additional Inherited Members | |
Public Types inherited from SVG::Element | |
using | ChildList = std::vector< Element * > |
using | ChildMap = std::map< std::string, ChildList > |
Public Attributes inherited from SVG::AttributeMap | |
SVGAttrib | attr |
Protected Member Functions inherited from SVG::Element | |
std::vector< Element * > | get_children_helper () |
void | get_bbox (Element::BoundingBox &) |
virtual std::string | svg_to_string (const size_t indent_level) |
virtual std::string | tag ()=0 |
double | find_numeric (const std::string &key) |
Protected Attributes inherited from SVG::Element | |
std::vector< std::unique_ptr< Element > > | children |
Base class for any SVG elements that have a width and height.
|
inlinevirtual |
Return this item's height, either by calculating it or finding the height attribute
|
inline |
Implicit conversion to Point
|
inlinevirtual |
Return a set of points used for calculating a bounding polygon for this object
|
inlinevirtual |
Return this item's width, either by calculating it or finding the width attribute