|
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.
Inheritance diagram for svg::element_base: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::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::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.
Here is the call graph for this function:
|
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.
Inheritance diagram for svg::group_element: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 156 of file a60-svg-elements.h.
Here is the call graph for this function:
|
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 205 of file a60-svg-elements.h.
Inheritance diagram for svg::defs_element: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 208 of file a60-svg-elements.h.
|
inlinestatic |
Definition at line 212 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 216 of file a60-svg-elements.h.
Here is the call graph for this function:| 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 245 of file a60-svg-elements.h.
Inheritance diagram for svg::link_element: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 248 of file a60-svg-elements.h.
|
inline |
Definition at line 255 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 267 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 295 of file a60-svg-elements.h.
Inheritance diagram for svg::filter_element: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 | |
| feImage | |
| feOffset | |
| feGaussianBlur | |
| feColorMatrix | |
| feComponentTransfer | |
Definition at line 297 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 308 of file a60-svg-elements.h.
|
inline |
Definition at line 312 of file a60-svg-elements.h.
|
inline |
Definition at line 321 of file a60-svg-elements.h.
|
inline |
Definition at line 338 of file a60-svg-elements.h.
|
inline |
Definition at line 345 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 378 of file a60-svg-elements.h.
Inheritance diagram for svg::gradient_element: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 | |
| meshgradient | |
| radialGradient | |
| stop | |
Definition at line 380 of file a60-svg-elements.h.
|
inlinevirtual |
Reimplemented from svg::defs_element.
Reimplemented in svg::linear_gradient, and svg::radial_gradient.
Definition at line 389 of file a60-svg-elements.h.
Here is the call graph for this function:
|
inline |
|
inline |
Definition at line 412 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 427 of file a60-svg-elements.h.
Inheritance diagram for svg::radial_gradient: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 430 of file a60-svg-elements.h.
Here is the call graph for this function:
|
inline |
|
inline |
| struct svg::linear_gradient |
Linear gradients https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient.
Definition at line 490 of file a60-svg-elements.h.
Inheritance diagram for svg::linear_gradient: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 493 of file a60-svg-elements.h.
Here is the call graph for this function:| 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 524 of file a60-svg-elements.h.
Inheritance diagram for svg::marker_element: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 527 of file a60-svg-elements.h.
|
inline |
Definition at line 531 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 564 of file a60-svg-elements.h.
Inheritance diagram for svg::title_element: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 567 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 592 of file a60-svg-elements.h.
Inheritance diagram for svg::desc_element: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 595 of file a60-svg-elements.h.
|
inline |
Definition at line 598 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 619 of file a60-svg-elements.h.
Inheritance diagram for svg::text_element: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 632 of file a60-svg-elements.h.
Here is the call graph for this function:
|
inlinevirtual |
Implements svg::element_base.
Definition at line 656 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 666 of file a60-svg-elements.h.
Here is the call graph for this function:
|
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 684 of file a60-svg-elements.h.
Here is the call graph for this function:
|
inlinestatic |
Definition at line 699 of file a60-svg-elements.h.
| struct svg::text_element::data |
Definition at line 621 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 623 of file a60-svg-elements.h.
| atype svg::text_element::data::_M_y_origin |
Definition at line 624 of file a60-svg-elements.h.
| string svg::text_element::data::_M_text |
Definition at line 625 of file a60-svg-elements.h.
| typography svg::text_element::data::_M_typo |
Definition at line 626 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 740 of file a60-svg-elements.h.
Inheritance diagram for svg::rect_element: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 758 of file a60-svg-elements.h.
Here is the call graph for this function:
|
inlinevirtual |
Implements svg::element_base.
Definition at line 776 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 752 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 753 of file a60-svg-elements.h.
| struct svg::rect_element::data |
Definition at line 742 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 744 of file a60-svg-elements.h.
| atype svg::rect_element::data::_M_y_origin |
Definition at line 745 of file a60-svg-elements.h.
| atype svg::rect_element::data::_M_width |
Definition at line 746 of file a60-svg-elements.h.
| atype svg::rect_element::data::_M_height |
Definition at line 747 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 797 of file a60-svg-elements.h.
Inheritance diagram for svg::circle_element: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 830 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 808 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 809 of file a60-svg-elements.h.
| struct svg::circle_element::data |
Definition at line 799 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 801 of file a60-svg-elements.h.
| atype svg::circle_element::data::_M_y_origin |
Definition at line 802 of file a60-svg-elements.h.
| atype svg::circle_element::data::_M_radius |
Definition at line 803 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 852 of file a60-svg-elements.h.
Inheritance diagram for svg::line_element: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 891 of file a60-svg-elements.h.
|
inline |
Definition at line 895 of file a60-svg-elements.h.
| struct svg::line_element::data |
Definition at line 854 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 856 of file a60-svg-elements.h.
| atype svg::line_element::data::_M_x_end |
Definition at line 857 of file a60-svg-elements.h.
| atype svg::line_element::data::_M_y_begin |
Definition at line 858 of file a60-svg-elements.h.
| atype svg::line_element::data::_M_y_end |
Definition at line 859 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 916 of file a60-svg-elements.h.
Inheritance diagram for svg::polyline_element: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 921 of file a60-svg-elements.h.
|
inline |
Definition at line 923 of file a60-svg-elements.h.
|
inline |
Definition at line 928 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 971 of file a60-svg-elements.h.
|
inline |
Definition at line 975 of file a60-svg-elements.h.
| vrange svg::polyline_element::polypoints |
Definition at line 919 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 997 of file a60-svg-elements.h.
Inheritance diagram for svg::path_element: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_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 1010 of file a60-svg-elements.h.
Here is the call graph for this function:
|
inlinevirtual |
Implements svg::element_base.
Definition at line 1023 of file a60-svg-elements.h.
|
inline |
Definition at line 1027 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 1005 of file a60-svg-elements.h.
| struct svg::path_element::data |
Definition at line 999 of file a60-svg-elements.h.
Public Attributes | |
| string | _M_d |
| atype | _M_length |
| string svg::path_element::data::_M_d |
Definition at line 1001 of file a60-svg-elements.h.
| atype svg::path_element::data::_M_length |
Definition at line 1002 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 1051 of file a60-svg-elements.h.
Inheritance diagram for svg::text_path_element: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 1057 of file a60-svg-elements.h.
|
inlinevirtual |
Definition at line 1062 of file a60-svg-elements.h.
| string svg::text_path_element::path_name |
Definition at line 1053 of file a60-svg-elements.h.
| string svg::text_path_element::offset |
Definition at line 1054 of file a60-svg-elements.h.
| string svg::text_path_element::side |
Definition at line 1055 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 1094 of file a60-svg-elements.h.
Inheritance diagram for svg::image_element: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 1115 of file a60-svg-elements.h.
Here is the call graph for this function:
|
inline |
Either serialize immediately (as below), or create data structure that adds data to data_vec and then finish_element serializes.
Definition at line 1124 of file a60-svg-elements.h.
Here is the call graph for this function:
|
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 1148 of file a60-svg-elements.h.
Here is the call graph for this function:| struct svg::image_element::data |
Definition at line 1096 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 1098 of file a60-svg-elements.h.
| atype svg::image_element::data::_M_x_origin |
Definition at line 1099 of file a60-svg-elements.h.
| atype svg::image_element::data::_M_y_origin |
Definition at line 1100 of file a60-svg-elements.h.
| atype svg::image_element::data::_M_width |
Definition at line 1101 of file a60-svg-elements.h.
| atype svg::image_element::data::_M_height |
Definition at line 1102 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 1198 of file a60-svg-elements.h.
Inheritance diagram for svg::foreign_element: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 1201 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 1255 of file a60-svg-elements.h.
Inheritance diagram for svg::video_element: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 1268 of file a60-svg-elements.h.
Here is the call graph for this function:
|
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 1283 of file a60-svg-elements.h.
Here is the call graph for this function:| 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 1313 of file a60-svg-elements.h.
Inheritance diagram for svg::iframe_element: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 1326 of file a60-svg-elements.h.
Here is the call graph for this function:
|
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 1334 of file a60-svg-elements.h.
Here is the call graph for this function:| 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 1367 of file a60-svg-elements.h.
Inheritance diagram for svg::object_element: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 1380 of file a60-svg-elements.h.
Here is the call graph for this function:
|
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 1389 of file a60-svg-elements.h.
Here is the call graph for this function:| struct svg::script_element |
A SVG script element.
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script
Definition at line 1417 of file a60-svg-elements.h.
Inheritance diagram for svg::script_element: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 | |
| document | |
| parent | |
| element | |
Definition at line 1422 of file a60-svg-elements.h.
|
inline |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 1435 of file a60-svg-elements.h.
Here is the call graph for this function:
|
inlinestatic |
showTooltip(id) hideTooltip(id) event.x vs. event.pageX, event.y vs. event.pageY
Definition at line 1442 of file a60-svg-elements.h.
|
inlinestatic |
|
inlinestatic |
|
inline |
Add string with script source.
| scriptstr | script source |
Definition at line 1527 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 1548 of file a60-svg-elements.h.
Inheritance diagram for svg::svg_element: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) |
| void | finish_element () |
| 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 1550 of file a60-svg-elements.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1591 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.
Here is the call graph for this function:| void svg::svg_element::start_element | ( | const point_2t | p, |
| const area | destarea, | ||
| const style & | sty = k::no_style ) |
|
virtual |
Implements svg::element_base.
|
inline |
|
inline |
| void svg::svg_element::add_filters | ( | ) |
| 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 1552 of file a60-svg-elements.h.
| const area svg::svg_element::_M_area |
Definition at line 1553 of file a60-svg-elements.h.
| const unit svg::svg_element::_M_unit |
Definition at line 1554 of file a60-svg-elements.h.
| const typography& svg::svg_element::_M_typo |
Definition at line 1555 of file a60-svg-elements.h.
| const bool svg::svg_element::_M_lifetime |
Definition at line 1556 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 710 of file a60-svg-elements.h.
Here is the call graph for this function:
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 192 of file a60-svg-elements.h.
Here is the call graph for this function:
|
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 224 of file a60-svg-elements.h.
Here is the call graph for this function:| void svg::element_base::store_element | ( | const element_base & | e | ) |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Definition at line 228 of file a60-svg-elements.h.
Here is the call graph for this function:
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 281 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 362 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 421 of file a60-svg-elements.h.
Here is the call graph for this function:
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Reimplemented from svg::gradient_element.
Definition at line 481 of file a60-svg-elements.h.
Here is the call graph for this function:
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Reimplemented from svg::gradient_element.
Definition at line 505 of file a60-svg-elements.h.
Here is the call graph for this function:
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 548 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 582 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 606 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 704 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 784 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 839 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 903 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 983 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 1035 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 1164 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 1246 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 1304 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 1357 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 1408 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 1538 of file a60-svg-elements.h.