|
izzi
SVG SUBSET C++ API
|
All svg components are derived from element_base as per hierarchy More...
All svg components are derived from element_base as per hierarchy
| struct svg::element_base |
Abstract base class for all SVG Elements.
Definition at line 31 of file a60-svg-elements.h.
Public Types | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
Public Member Functions | |
| virtual void | start_element ()=0 |
| virtual void | finish_element ()=0 |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Public Attributes | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
Static Public Attributes | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
| using svg::element_base::stream_type = std::ostringstream |
Definition at line 33 of file a60-svg-elements.h.
| using svg::element_base::atype = space_type |
Definition at line 39 of file a60-svg-elements.h.
|
pure virtual |
Implemented in svg::circle_element, svg::defs_element, svg::desc_element, svg::filter_element, svg::foreign_element, svg::gradient_element, svg::group_element, svg::iframe_element, svg::image_element, svg::line_element, svg::linear_gradient, svg::link_element, svg::marker_element, svg::object_element, svg::path_element, svg::polygon_element, svg::polyline_element, svg::radial_gradient, svg::rect_element, svg::script_element, svg::svg_element, svg::text_element, svg::title_element, and svg::video_element.
|
pure virtual |
Implemented in svg::circle_element, svg::defs_element, svg::desc_element, svg::filter_element, svg::foreign_element, svg::gradient_element, svg::group_element, svg::iframe_element, svg::image_element, svg::line_element, svg::linear_gradient, svg::link_element, svg::marker_element, svg::object_element, svg::path_element, svg::polygon_element, svg::polyline_element, svg::radial_gradient, svg::rect_element, svg::script_element, svg::svg_element, svg::text_element, svg::title_element, and svg::video_element.
|
inline |
Empty when the output buffer is.
Definition at line 53 of file a60-svg-elements.h.
|
inline |
Definition at line 56 of file a60-svg-elements.h.
|
inline |
Definition at line 59 of file a60-svg-elements.h.
|
inline |
|
inline |
Definition at line 71 of file a60-svg-elements.h.
|
inline |
Definition at line 79 of file a60-svg-elements.h.
|
inline |
Definition at line 88 of file a60-svg-elements.h.
|
inline |
| void svg::element_base::add_title | ( | const string & | t | ) |
Definition at line 23 of file a60-svg-elements-components.h.
|
inline |
Common transforms include rotate(180)
Definition at line 100 of file a60-svg-elements.h.
|
inline |
|
staticconstexpr |
Definition at line 34 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 35 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 36 of file a60-svg-elements.h.
| stream_type svg::element_base::_M_sstream |
Virtual, only one buffer.
Definition at line 43 of file a60-svg-elements.h.
| struct svg::group_element |
Group SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/g
Attributes: x, y, width, height, xlink:xref, preserveAspectRatio
Definition at line 125 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element () |
| For groups of elements that have the same name. | |
| void | start_element (string name) |
| void | start_element (string name, const style &sty) |
| void | start_element (string name, const string ts, const style &sty=k::no_style) |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Static Public Member Functions | |
| static string | start_group (const string name) |
| static string | finish_group () |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inlinestatic |
Definition at line 128 of file a60-svg-elements.h.
|
inlinestatic |
Definition at line 144 of file a60-svg-elements.h.
|
inlinevirtual |
For groups of elements that have the same name.
Also, although one can nest SVG elements inside another SVG by using an 'image_element', the display quality is lacking in inkscape. To work around this, insert the contents of the nested SVG into a named group element instead.
Implements svg::element_base.
Definition at line 154 of file a60-svg-elements.h.
|
inline |
|
inline |
|
inline |
| struct svg::defs_element |
Definitions SVG element. Storage space for elements used later.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs
Attributes: id
Definition at line 203 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element () |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Static Public Member Functions | |
| static string | start_defs () |
| static string | finish_defs () |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inlinestatic |
Definition at line 206 of file a60-svg-elements.h.
|
inlinestatic |
Definition at line 210 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Reimplemented in svg::gradient_element, svg::linear_gradient, and svg::radial_gradient.
Definition at line 214 of file a60-svg-elements.h.
| struct svg::link_element |
Link SVG element. a
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/a
Attributes: id
Definition at line 243 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element () |
| void | finish_element () |
| void | add_data (const string &url) |
| void | add_data (const string &url, const string relt, const string ast, const string cors="anonymous") |
| Overload for rel=x form. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/preload. | |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 246 of file a60-svg-elements.h.
|
inline |
Definition at line 253 of file a60-svg-elements.h.
|
inline |
Overload for rel=x form. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/preload.
| relt | attribute that describes the relationship of the target object to the link object |
| ast | type of resource. |
Definition at line 265 of file a60-svg-elements.h.
| struct svg::filter_element |
Datum consolidating filter use and preferences.
<filter id="gblur10" x="0" y="0"> <feGaussianBlur in="SourceGraphic" stdDeviation="10" /> <feOffset dx="0" dy="0" /> </filter>
Definition at line 293 of file a60-svg-elements.h.
Public Types | |
| enum class | type { feBlend , feImage , feOffset , feGaussianBlur , feColorMatrix , feComponentTransfer } |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
Public Member Functions | |
| void | start_element () |
| void | start_element (const string id) |
| void | start_element (const string id, const area<> blur_area, const point_2t p) |
| void | finish_element () |
| void | add_data (const string fltr) |
| string | gaussian_blur (string in, string dev) |
| string | gaussian_blur (string dev) |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
strong |
| Enumerator | |
|---|---|
| feBlend | Blend. |
| feImage | Image. |
| feOffset | Offset, dx="0", dy="0". |
| feGaussianBlur | Gaussian Blur. |
| feColorMatrix | |
| feComponentTransfer | |
Definition at line 295 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 306 of file a60-svg-elements.h.
|
inline |
Definition at line 310 of file a60-svg-elements.h.
|
inline |
Definition at line 319 of file a60-svg-elements.h.
|
inline |
Definition at line 336 of file a60-svg-elements.h.
|
inline |
Definition at line 343 of file a60-svg-elements.h.
|
inline |
| struct svg::gradient_element |
Gradient SVG elements.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/radialGradient https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient
Note these are always inside a defs block.
Attributes: id
Definition at line 376 of file a60-svg-elements.h.
Public Types | |
| enum class | type { linearGradient , meshgradient , radialGradient , stop } |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
Public Member Functions | |
| void | start_element () |
| void | finish_element () |
| void | stop (const string off, const color &klr, const double opacity=1.0) |
| const string | offset_percentage (const ssize_type numer, const ssize_type denom) |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Static Public Member Functions inherited from svg::defs_element | |
| static string | start_defs () |
| static string | finish_defs () |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
strong |
| Enumerator | |
|---|---|
| linearGradient | Linear. |
| meshgradient | Mesh. |
| radialGradient | Radial. |
| stop | stop, last |
Definition at line 378 of file a60-svg-elements.h.
|
inlinevirtual |
Reimplemented from svg::defs_element.
Reimplemented in svg::linear_gradient, and svg::radial_gradient.
Definition at line 387 of file a60-svg-elements.h.
|
inline |
|
inline |
Definition at line 410 of file a60-svg-elements.h.
| struct svg::radial_gradient |
Circular gradients https://developer.mozilla.org/en-US/docs/Web/SVG/Element/radialGradient.
Definition at line 425 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element () |
| void | start_element (const string id, const ssize_type radius=0, const ssize_type cx=0, const ssize_type cy=0) |
| void | start_element (const string id, const ssize_type radius, const ssize_type cx, const ssize_type cy, const ssize_type fr, const ssize_type fx, const ssize_type fy) |
| void | finish_element () |
| Public Member Functions inherited from svg::gradient_element | |
| void | stop (const string off, const color &klr, const double opacity=1.0) |
| const string | offset_percentage (const ssize_type numer, const ssize_type denom) |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::gradient_element | |
| enum class | type { linearGradient , meshgradient , radialGradient , stop } |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Static Public Member Functions inherited from svg::defs_element | |
| static string | start_defs () |
| static string | finish_defs () |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inlinevirtual |
Reimplemented from svg::gradient_element.
Definition at line 428 of file a60-svg-elements.h.
|
inline |
|
inline |
| struct svg::linear_gradient |
Linear gradients https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient.
Definition at line 488 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element () |
| void | finish_element () |
| Public Member Functions inherited from svg::gradient_element | |
| void | stop (const string off, const color &klr, const double opacity=1.0) |
| const string | offset_percentage (const ssize_type numer, const ssize_type denom) |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::gradient_element | |
| enum class | type { linearGradient , meshgradient , radialGradient , stop } |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Static Public Member Functions inherited from svg::defs_element | |
| static string | start_defs () |
| static string | finish_defs () |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inlinevirtual |
Reimplemented from svg::gradient_element.
Definition at line 491 of file a60-svg-elements.h.
| struct svg::marker_element |
Marker SVG elements defines a graphic used for drawing arrow[heads, tails, mid] on a poly line or path.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/marker-mid
Note these are always inside a defs block.
Attributes: id
Definition at line 522 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element () |
| void | start_element (const string id, const area<> a, const point_2t p) |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 525 of file a60-svg-elements.h.
|
inline |
Definition at line 529 of file a60-svg-elements.h.
| struct svg::title_element |
Title SVG element. This is accessible/alt text. This element must be the first element in the svg objectc.
A title element with no string indicates a decorative element to AT screenreaders.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title
Definition at line 562 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element () |
| void | start_element (const string t) |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 565 of file a60-svg-elements.h.
|
inline |
| struct svg::desc_element |
Description SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/desc
Definition at line 590 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element () |
| void | start_element (const string dsc) |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 593 of file a60-svg-elements.h.
|
inline |
Definition at line 596 of file a60-svg-elements.h.
| struct svg::text_element |
Text SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text
Attributes: x, y, dx, dy, text-anchor, rotate, textLength, lengthAdjust
Definition at line 617 of file a60-svg-elements.h.
Public Member Functions | |
| void | add_data (const data &d, const string trans="", const unit utype=svg::unit::point) |
| Either serialize immediately (as below), or create data structure that adds data to data_vec and then finish_element serializes. | |
| void | start_element () |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Static Public Member Functions | |
| static string | start_tspan_y (uint xpos, string dy) |
| For text list output, use tspan for line breaks. This span creates a new horizontal line for every tspan block, starting at xpos with spacing dy (1.2em). | |
| static string | start_tspan_y (uint xpos, uint dy) |
| static string | start_tspan_x (uint xpos, string dx) |
| For text list output, use tspan for line breaks. This span creates a new vertical line space for every tspan block, starting at xpos with horizontal spacing dx ("1.4em"). | |
| static string | start_tspan_x (uint xpos, uint dx) |
| static string | finish_tspan () |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inline |
Either serialize immediately (as below), or create data structure that adds data to data_vec and then finish_element serializes.
Definition at line 630 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 654 of file a60-svg-elements.h.
|
inlinestatic |
For text list output, use tspan for line breaks. This span creates a new horizontal line for every tspan block, starting at xpos with spacing dy (1.2em).
Definition at line 664 of file a60-svg-elements.h.
|
inlinestatic |
For text list output, use tspan for line breaks. This span creates a new vertical line space for every tspan block, starting at xpos with horizontal spacing dx ("1.4em").
Definition at line 682 of file a60-svg-elements.h.
|
inlinestatic |
Definition at line 697 of file a60-svg-elements.h.
| struct svg::text_element::data |
Definition at line 619 of file a60-svg-elements.h.
Public Attributes | |
| atype | _M_x_origin |
| atype | _M_y_origin |
| string | _M_text |
| typography | _M_typo |
| atype svg::text_element::data::_M_x_origin |
Definition at line 621 of file a60-svg-elements.h.
| atype svg::text_element::data::_M_y_origin |
Definition at line 622 of file a60-svg-elements.h.
| string svg::text_element::data::_M_text |
Definition at line 623 of file a60-svg-elements.h.
| typography svg::text_element::data::_M_typo |
Definition at line 624 of file a60-svg-elements.h.
| struct svg::rect_element |
Rectangle SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/rect
Attributes: x, y, width, height, rx, ry
Definition at line 738 of file a60-svg-elements.h.
Public Member Functions | |
| void | add_data (const data &d) |
| Either serialize immediately (as below), or create data structure that adds data to data_vec and then finish_element serializes. | |
| void | start_element () |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Static Public Attributes | |
| static constexpr const char * | pair_open_tag = "<rect>" |
| static constexpr const char * | pair_finish_tag = "</rect>" |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
|
inline |
Either serialize immediately (as below), or create data structure that adds data to data_vec and then finish_element serializes.
Definition at line 756 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 773 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 750 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 751 of file a60-svg-elements.h.
| struct svg::rect_element::data |
Definition at line 740 of file a60-svg-elements.h.
Public Attributes | |
| atype | _M_x_origin |
| atype | _M_y_origin |
| atype | _M_width |
| atype | _M_height |
| atype svg::rect_element::data::_M_x_origin |
Definition at line 742 of file a60-svg-elements.h.
| atype svg::rect_element::data::_M_y_origin |
Definition at line 743 of file a60-svg-elements.h.
| atype svg::rect_element::data::_M_width |
Definition at line 744 of file a60-svg-elements.h.
| atype svg::rect_element::data::_M_height |
Definition at line 745 of file a60-svg-elements.h.
| struct svg::circle_element |
Circle SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle
Attributes: x, y, width, height, xlink:xref, preserveAspectRatio
Definition at line 795 of file a60-svg-elements.h.
Public Member Functions | |
| void | add_data (const data &d, string trans="") |
| void | start_element () |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Static Public Attributes | |
| static constexpr const char * | pair_open_tag = "<circle>" |
| static constexpr const char * | pair_finish_tag = "</circle>" |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
|
inline |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 828 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 806 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 807 of file a60-svg-elements.h.
| struct svg::circle_element::data |
Definition at line 797 of file a60-svg-elements.h.
Public Attributes | |
| atype | _M_x_origin |
| atype | _M_y_origin |
| atype | _M_radius |
| atype svg::circle_element::data::_M_x_origin |
Definition at line 799 of file a60-svg-elements.h.
| atype svg::circle_element::data::_M_y_origin |
Definition at line 800 of file a60-svg-elements.h.
| atype svg::circle_element::data::_M_radius |
Definition at line 801 of file a60-svg-elements.h.
| struct svg::polygon_element |
Polygon SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/polygon
Attributes: points
Definition at line 850 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element () |
| void | add_data (const vrange &points) |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Static Public Attributes | |
| static constexpr const char * | pair_open_tag = "<polygon>" |
| static constexpr const char * | pair_finish_tag = "</polygon>" |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 858 of file a60-svg-elements.h.
|
inline |
Definition at line 862 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 854 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 855 of file a60-svg-elements.h.
| struct svg::line_element |
Line SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/line
Attributes: x, y, width, height, xlink:xref, preserveAspectRatio
Definition at line 890 of file a60-svg-elements.h.
Public Member Functions | |
| void | add_data (const data &d, const string dasharray="") |
| void | start_element () |
| void | start_element (string name) |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inline |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 929 of file a60-svg-elements.h.
|
inline |
Definition at line 933 of file a60-svg-elements.h.
| struct svg::line_element::data |
Definition at line 892 of file a60-svg-elements.h.
Public Attributes | |
| atype | _M_x_begin |
| atype | _M_x_end |
| atype | _M_y_begin |
| atype | _M_y_end |
| atype svg::line_element::data::_M_x_begin |
Definition at line 894 of file a60-svg-elements.h.
| atype svg::line_element::data::_M_x_end |
Definition at line 895 of file a60-svg-elements.h.
| atype svg::line_element::data::_M_y_begin |
Definition at line 896 of file a60-svg-elements.h.
| atype svg::line_element::data::_M_y_end |
Definition at line 897 of file a60-svg-elements.h.
| struct svg::polyline_element |
Polyline SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/polyline
Attributes: points, pathLength
Definition at line 954 of file a60-svg-elements.h.
Public Member Functions | |
| polyline_element () | |
| polyline_element (const vrange &points) | |
| void | add_data (const stroke_style &sstyl) |
| void | start_element () |
| void | start_element (string name) |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Public Attributes | |
| vrange | polypoints |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inline |
Definition at line 959 of file a60-svg-elements.h.
|
inline |
Definition at line 961 of file a60-svg-elements.h.
|
inline |
Definition at line 966 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 1010 of file a60-svg-elements.h.
|
inline |
Definition at line 1014 of file a60-svg-elements.h.
| vrange svg::polyline_element::polypoints |
Definition at line 957 of file a60-svg-elements.h.
| struct svg::path_element |
Path SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path
Attributes: d, pathLength
Definition at line 1036 of file a60-svg-elements.h.
Public Member Functions | |
| void | add_data (const data &d) |
| Either serialize immediately (as below), or create data structure that adds data to data_vec and then finish_element serializes. | |
| void | start_element () |
| void | start_element (const string name) |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Static Public Attributes | |
| static constexpr const char * | pair_open_tag = "<path>" |
| static constexpr const char * | pair_finish_tag = "</path>" |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
|
inline |
Either serialize immediately (as below), or create data structure that adds data to data_vec and then finish_element serializes.
Definition at line 1052 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 1065 of file a60-svg-elements.h.
|
inline |
Definition at line 1069 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 1046 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 1047 of file a60-svg-elements.h.
| struct svg::path_element::data |
Definition at line 1038 of file a60-svg-elements.h.
Public Attributes | |
| string | _M_d |
| atype | _M_length |
| string svg::path_element::data::_M_d |
Definition at line 1040 of file a60-svg-elements.h.
| atype svg::path_element::data::_M_length |
Definition at line 1041 of file a60-svg-elements.h.
| struct svg::text_path_element |
Text on a Path SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/textPath
Attributes: href, path, method, side, spacing, startOffset, textLength, lengthAdjust
Definition at line 1093 of file a60-svg-elements.h.
Public Member Functions | |
| text_path_element (const string name, const string off="", const string whichside="") | |
| virtual void | add_text (string txt) |
| Public Member Functions inherited from svg::text_element | |
| void | add_data (const data &d, const string trans="", const unit utype=svg::unit::point) |
| Either serialize immediately (as below), or create data structure that adds data to data_vec and then finish_element serializes. | |
| void | start_element () |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Public Attributes | |
| string | path_name |
| string | offset |
| string | side |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Static Public Member Functions inherited from svg::text_element | |
| static string | start_tspan_y (uint xpos, string dy) |
| For text list output, use tspan for line breaks. This span creates a new horizontal line for every tspan block, starting at xpos with spacing dy (1.2em). | |
| static string | start_tspan_y (uint xpos, uint dy) |
| static string | start_tspan_x (uint xpos, string dx) |
| For text list output, use tspan for line breaks. This span creates a new vertical line space for every tspan block, starting at xpos with horizontal spacing dx ("1.4em"). | |
| static string | start_tspan_x (uint xpos, uint dx) |
| static string | finish_tspan () |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inline |
Definition at line 1099 of file a60-svg-elements.h.
|
inlinevirtual |
Definition at line 1104 of file a60-svg-elements.h.
| string svg::text_path_element::path_name |
Definition at line 1095 of file a60-svg-elements.h.
| string svg::text_path_element::offset |
Definition at line 1096 of file a60-svg-elements.h.
| string svg::text_path_element::side |
Definition at line 1097 of file a60-svg-elements.h.
| struct svg::image_element |
Image SVG element. This can be another SVG file, or can be a raster image format like PNG or JPEG.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/image
Attributes: x, y, width, height, xlink:xref, preserveAspectRatio
Definition at line 1136 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element (const string &id) |
| void | start_element () |
| void | finish_element () |
| void | add_data (const data &d) |
| Either serialize immediately (as below), or create data structure that adds data to data_vec and then finish_element serializes. | |
| void | add_data (const data &d, const string cors, const string vattr, const string display="") |
| Visibility and other HTML/img attributes. | |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inline |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 1157 of file a60-svg-elements.h.
|
inline |
Either serialize immediately (as below), or create data structure that adds data to data_vec and then finish_element serializes.
Definition at line 1166 of file a60-svg-elements.h.
|
inline |
Visibility and other HTML/img attributes.
| vattr | = visibility attribute, "visible" or "hidden" |
| display | = display attribute, "none" or "unset" or "initial" |
| cors | = CORS, "anonymous" or "use-credentials" |
| lattr | = loading attribute, "lazy" or "eager" |
Definition at line 1190 of file a60-svg-elements.h.
| struct svg::image_element::data |
Definition at line 1138 of file a60-svg-elements.h.
Public Attributes | |
| string | _M_xref |
| atype | _M_x_origin |
| atype | _M_y_origin |
| atype | _M_width |
| atype | _M_height |
| string svg::image_element::data::_M_xref |
Definition at line 1140 of file a60-svg-elements.h.
| atype svg::image_element::data::_M_x_origin |
Definition at line 1141 of file a60-svg-elements.h.
| atype svg::image_element::data::_M_y_origin |
Definition at line 1142 of file a60-svg-elements.h.
| atype svg::image_element::data::_M_width |
Definition at line 1143 of file a60-svg-elements.h.
| atype svg::image_element::data::_M_height |
Definition at line 1144 of file a60-svg-elements.h.
| struct svg::foreign_element |
So-called Foreign Objects.
Using to get HTML video elements.
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject https://stackoverflow.com/questions/40324916/video-tag-embedded-in-svg
Translate moves the origin from the top left to the specified coordinates. If you embed an object at 0,0 it will be placed at the new origin. In this case you must embed it at -translation coordinates.
Even so, I had to increase the width and height. Why? I don't know. It doesn't seem to be a scale by 2. If someone knows I am curious to know.
<svg version="1.1" class="center-block" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800" height="600" style="border: 1px solid black;"> <g> <g transform="translate(151,104) scale(1,1)"> <rect x="0" y="0" width="300" height="200"></rect> <foreignObject x="-151" y="-104" width="500" height="400"> <video xmlns="http://www.w3.org/1999/xhtml" width="300" height="200" controls="" style="position: fixed; left: 151px; top: 104px;"> <source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4" >less </video> </foreignObject> </g> </g> </svg>
Definition at line 1240 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element () |
| void | start_element (const point_2t origin, const area<> av, const area<>, const point_2t scale=std::make_tuple(1.0, 1.0)) |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inlinevirtual |
Implements svg::element_base.
Reimplemented in svg::iframe_element, svg::object_element, and svg::video_element.
Definition at line 1243 of file a60-svg-elements.h.
| struct svg::video_element |
video HTML object embedded in SVG container. NB: HTML elements video/audio/iframe/canvas can be used w/o foreignElement. This approach uses HTML wrapped in foreign element. https://www.w3.org/TR/SVG2/embedded.html#HTMLElements https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
Definition at line 1297 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element (const string &id) |
| void | start_element () |
| void | add_data (const area<> a, const string src, const string mtype="video/mp4", const string attr=R"(autoplay="true" loop="true" muted="true")") |
| Video. a is width and height of video as embedded in page r is the foreign object, with x/y offset and scaled size. | |
| void | finish_element () |
| Public Member Functions inherited from svg::foreign_element | |
| void | start_element (const point_2t origin, const area<> av, const area<>, const point_2t scale=std::make_tuple(1.0, 1.0)) |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inline |
|
inlinevirtual |
Reimplemented from svg::foreign_element.
Definition at line 1310 of file a60-svg-elements.h.
|
inline |
Video. a is width and height of video as embedded in page r is the foreign object, with x/y offset and scaled size.
attr is attribues for video_element autoplay="true" or removed loop="true/false" muted="true/false" controls, controlslist, crossorigin, disablepictureinpicture, disableremoteplayback
Definition at line 1325 of file a60-svg-elements.h.
| struct svg::iframe_element |
iframe HTML object embedded in SVG container. NB: HTML elements video/audio/iframe/canvas can be used w/o foreignElement. This approach uses HTML wrapped in foreign element. https://www.w3.org/TR/SVG2/embedded.html#HTMLElements https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
Definition at line 1355 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element (const string &id) |
| void | start_element () |
| void | add_data (const area<> a, const string src, const string mtype="image/jpeg", const string attr=R"(sandbox="allow-scripts allow-same-origin")") |
| iframe. a is width and height of video as embedded in page r is the foreign object, with x/y offset and scaled size | |
| void | finish_element () |
| Public Member Functions inherited from svg::foreign_element | |
| void | start_element (const point_2t origin, const area<> av, const area<>, const point_2t scale=std::make_tuple(1.0, 1.0)) |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inline |
|
inlinevirtual |
Reimplemented from svg::foreign_element.
Definition at line 1368 of file a60-svg-elements.h.
|
inline |
iframe. a is width and height of video as embedded in page r is the foreign object, with x/y offset and scaled size
Definition at line 1376 of file a60-svg-elements.h.
| struct svg::object_element |
HTML object embedded in SVG container. Unlike image_elements, object_elements are not locked down for scripting. NB: HTML elements video/audio/object/canvas can be used w/o foreignElement. This approach uses HTML wrapped in foreign element. https://www.w3.org/TR/SVG2/embedded.html#HTMLElements https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object.
Definition at line 1409 of file a60-svg-elements.h.
Public Member Functions | |
| void | start_element (const string &id) |
| void | start_element () |
| void | add_data (const area<> a, const string src, const string mtype="image/jpeg", const string attr=R"(sandbox="allow-scripts allow-same-origin")") |
| Add resource to object. | |
| void | finish_element () |
| Public Member Functions inherited from svg::foreign_element | |
| void | start_element (const point_2t origin, const area<> av, const area<>, const point_2t scale=std::make_tuple(1.0, 1.0)) |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Additional Inherited Members | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
inline |
|
inlinevirtual |
Reimplemented from svg::foreign_element.
Definition at line 1422 of file a60-svg-elements.h.
|
inline |
Add resource to object.
| a | is width and height of video as embedded in page |
| src | is the resource URL |
| mtype | is the MIME type |
| attr | is any collection of ad-hoc HTML attributes. |
Definition at line 1431 of file a60-svg-elements.h.
| struct svg::script_element |
A SVG script element.
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script
Definition at line 1459 of file a60-svg-elements.h.
Public Types | |
| enum class | scope { none , document , parent , element } |
| Where is the script element placed? On/within the element itself, or at the document (global)? Neither (none), alongside/same level (parent)? More... | |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
Public Member Functions | |
| void | start_element (const string &id) |
| void | start_element () |
| void | add_data (const string scriptstr) |
| Add string with script source. | |
| void | finish_element () |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Static Public Member Functions | |
| static const string & | tooltip_javascript (const scope context) |
| showTooltip(id) hideTooltip(id) event.x vs. event.pageX, event.y vs. event.pageY | |
| static const string | tooltip_attribute (const string &id) |
| static const script_element | tooltip_script (const scope context) |
Additional Inherited Members | |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
|
strong |
Where is the script element placed? On/within the element itself, or at the document (global)? Neither (none), alongside/same level (parent)?
| Enumerator | |
|---|---|
| none | Script scope removed. |
| document | Scripts scoped to toplevel document. |
| parent | Scripts scoped to parent. |
| element | Scripts scoped to element. |
Definition at line 1464 of file a60-svg-elements.h.
|
inline |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 1483 of file a60-svg-elements.h.
|
inlinestatic |
showTooltip(id) hideTooltip(id) event.x vs. event.pageX, event.y vs. event.pageY
Definition at line 1490 of file a60-svg-elements.h.
|
inlinestatic |
Definition at line 1508 of file a60-svg-elements.h.
|
inlinestatic |
Definition at line 1520 of file a60-svg-elements.h.
|
inline |
Add string with script source.
| scriptstr | script source |
Definition at line 1533 of file a60-svg-elements.h.
| struct svg::svg_element |
A SVG object element.
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg https://developer.mozilla.org/en-US/docs/Web/SVG/SVG_as_an_Image
Definition at line 1596 of file a60-svg-elements.h.
Public Types | |
| using | area = svg::area<atype> |
| Public Types inherited from svg::element_base | |
| using | stream_type = std::ostringstream |
| using | atype = space_type |
Public Member Functions | |
| svg_element (const string __title, const area &__cv, const bool lifetime=true, const unit u=svg::unit::pixel, const typography &__typo=k::smono_typo) | |
| svg_element (const string __title, const string desc, const area &__cv, const bool lifetime=true) | |
| svg_element (const svg_element &other) | |
| ~svg_element () | |
| const point_2t | center_point () |
| void | start_element () |
| SVG element beginning boilerplate for outermost (containing) svg_element. Variable: unit, x=0, y=0, width, height. | |
| void | start_element (const point_2t p, const area destarea, const style &sty=k::no_style) |
| SVG element for nested svg_element. Use name, area, unit, typo for viewport frame. | |
| void | finish_element () |
| SVG element end boilerplate. | |
| void | add_title () |
| void | add_desc (const string desc) |
| void | add_filters () |
| void | write () |
| void | start (const string &desc="") |
| void | finish (const bool writep=true) |
| Public Member Functions inherited from svg::element_base | |
| bool | empty () |
| Empty when the output buffer is. | |
| string | str () const |
| void | str (const string &s) |
| void | store_element (const element_base &e) |
| void | add_element (const element_base &e) |
| void | add_fill (const string id) |
| void | add_filter (const string id) |
| void | add_raw (const string &raw) |
| void | add_style (const style &sty) |
| void | add_title (const string &t) |
| string | make_transform_attribute (const string s) |
| Common transforms include rotate(180) | |
| void | add_transform (const string s) |
Public Attributes | |
| const string | _M_name |
| const area | _M_area |
| const unit | _M_unit |
| const typography & | _M_typo |
| const bool | _M_lifetime |
| Public Attributes inherited from svg::element_base | |
| stream_type | _M_sstream |
| Virtual, only one buffer. | |
Additional Inherited Members | |
| Static Public Attributes inherited from svg::element_base | |
| static constexpr const char * | finish_tag = " >" |
| static constexpr string | finish_tag_hard = string(finish_tag) + k::newline |
| static constexpr const char * | self_finish_tag = " />" |
| using svg::svg_element::area = svg::area<atype> |
Definition at line 1598 of file a60-svg-elements.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1639 of file a60-svg-elements.h.
|
virtual |
SVG element beginning boilerplate for outermost (containing) svg_element. Variable: unit, x=0, y=0, width, height.
Implements svg::element_base.
Definition at line 51 of file a60-svg-elements-components.h.
| void svg::svg_element::start_element | ( | const point_2t | p, |
| const area | destarea, | ||
| const style & | styl = k::no_style ) |
SVG element for nested svg_element. Use name, area, unit, typo for viewport frame.
| p | origin x,y position |
| desta | height, width of destination, iff > _M_area then enlarge. |
Definition at line 77 of file a60-svg-elements-components.h.
|
virtual |
SVG element end boilerplate.
Implements svg::element_base.
Definition at line 141 of file a60-svg-elements-components.h.
|
inline |
|
inline |
| void svg::svg_element::add_filters | ( | ) |
Definition at line 131 of file a60-svg-elements-components.h.
| void svg::svg_element::write | ( | ) |
Definition at line 32 of file a60-svg-elements-components.h.
|
inline |
|
inline |
| const string svg::svg_element::_M_name |
Definition at line 1600 of file a60-svg-elements.h.
| const area svg::svg_element::_M_area |
Definition at line 1601 of file a60-svg-elements.h.
| const unit svg::svg_element::_M_unit |
Definition at line 1602 of file a60-svg-elements.h.
| const typography& svg::svg_element::_M_typo |
Definition at line 1603 of file a60-svg-elements.h.
| const bool svg::svg_element::_M_lifetime |
Definition at line 1604 of file a60-svg-elements.h.
| string svg::make_tspan_y_from_string_by_token | ( | string | s, |
| uint | xpos, | ||
| const char | token = ' ' ) |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Make text span.
Definition at line 708 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 190 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Reimplemented in svg::gradient_element, svg::linear_gradient, and svg::radial_gradient.
Definition at line 222 of file a60-svg-elements.h.
| void svg::element_base::store_element | ( | const element_base & | e | ) |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Definition at line 226 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 279 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 360 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Reimplemented from svg::defs_element.
Reimplemented in svg::linear_gradient, and svg::radial_gradient.
Definition at line 419 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Reimplemented from svg::gradient_element.
Definition at line 479 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Reimplemented from svg::gradient_element.
Definition at line 503 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 546 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 580 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 604 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 702 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 782 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 837 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 877 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 941 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 1022 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 1077 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 1206 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Reimplemented in svg::iframe_element, svg::object_element, and svg::video_element.
Definition at line 1288 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Reimplemented from svg::foreign_element.
Definition at line 1346 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Reimplemented from svg::foreign_element.
Definition at line 1399 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Reimplemented from svg::foreign_element.
Definition at line 1450 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 1586 of file a60-svg-elements.h.