|
SVG for C++
|
Main namespace for SVG for C++. More...
Classes | |
| class | AttributeMap |
| Base class for anything that has attributes (e.g. SVG elements, CSS stylesheets) More... | |
| struct | Attrs |
| struct | AutoscaleOptions |
| class | Circle |
| class | Classes |
| class | ClassList |
| Ordered token list for managing the class attribute. More... | |
| struct | ClassSpec |
| class | Color |
| class | Defs |
| class | Element |
| Abstract base class for all SVG elements. More... | |
| class | Group |
| class | Line |
| class | LinearGradient |
| class | Path |
| class | Polygon |
| struct | QuadCoord |
| class | RadialGradient |
| class | Rect |
| class | Shape |
| Base class for any SVG elements that have a width and height. More... | |
| class | SVG |
| class | Symbol |
| class | Text |
| class | Title |
| class | TransformList |
| Ordered function list for managing the transform attribute. More... | |
| class | Use |
| class | Variables |
| struct | VariableSpec |
Typedefs | |
| using | SelectorProperties = std::map< std::string, AttributeMap > |
| using | SVGAttrib = std::map< std::string, std::string > |
| using | Point = std::pair< double, double > |
| using | Margins = QuadCoord |
| using | Alignment = unsigned |
| using | G = Group |
Enumerations | |
| enum class | ElementKind { Custom , Defs , LinearGradient , RadialGradient , Stop , Symbol , Use , SVG , Style , Path , Text , Title , Group , Line , Rect , Circle , Polygon } |
| enum class | RelativeAlignment : unsigned { Left = 1u << 0 , Top = 1u << 1 , Right = 1u << 2 , Bottom = 1u << 3 } |
| enum class | Anchor : unsigned { Start = 1u << 4 , Center = 1u << 5 , End = 1u << 6 } |
| enum class | Axis { X , Y } |
Functions | |
| std::string | tag_name (ElementKind kind) |
| Alignment | operator| (RelativeAlignment relative, Anchor anchor) |
| Alignment | operator| (Anchor anchor, RelativeAlignment relative) |
| std::string | to_string (const double &value) |
| std::string | to_string (const Point &point) |
| std::string | to_string (const Color &color) |
| std::string | to_string (const std::map< std::string, AttributeMap > &css, const size_t indent_level=0) |
| std::string | escape_xml (const std::string &text) |
| std::vector< Point > | bounding_polygon (const std::vector< Shape * > &shapes) |
| SVG | frame_animate (std::vector< SVG > &frames, const double fps) |
| SVG | merge (SVG &left, SVG &right, const Margins &margins=DEFAULT_MARGINS) |
| SVG | merge (std::vector< SVG > &frames, const double width, const int max_frame_width) |
| std::vector< Point > | bounding_polygon (std::vector< Shape * > &shapes) |
Main namespace for SVG for C++.
| using SVG::Alignment = typedef unsigned |
Bitwise combination of RelativeAlignment and Anchor.
| using SVG::SelectorProperties = typedef std::map<std::string, AttributeMap> |
A mapping of CSS selectors to their corresponding style attributes
|
strong |
Anchor point along one axis of an element's layout bounds.
|
strong |
Axis used when aligning two elements without making them neighbors.
|
strong |
Stable element categories used for typed lookup without requiring RTTI.
|
strong |
Side of a target element where another element should be positioned.
|
inline |
Escape text for XML element content or attribute values.
Given a vector of SVGs, create a frame-by-frame animation of them.
Given a vector of SVGs, create a frame-by-frame animation of them.
|
inline |
Given a vector of SVGs, merge them together max_frame_width: Maximum width of any individual frame
Given a vector of SVGs, merge them together max_frame_width: Maximum width of any individual frame
|
inline |
Return the native SVG tag name for a built-in kind, or an empty string for Custom.
|
inline |
Return the serialized CSS color token.
Return the serialized CSS color token.
Return the serialized CSS color token.
|
inline |
Trim off all but one decimal place when converting a double to string
Trim off all but one decimal place when converting a double to string
|
inline |
Return a string representation of a point as "x,y"
Return a string representation of a point as "x,y"
|
inline |
Print out a CSS attribute block
Print out a CSS attribute block