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::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 794 of file a60-svg-elements.h.
Public Member Functions | |
void | add_data (const data &d, string trans="") |
void | finish_element () |
void | start_element () |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Static Public Attributes | |
static constexpr const char * | pair_finish_tag = "</circle>" |
static constexpr const char * | pair_open_tag = "<circle>" |
![]() | |
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 | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
|
inline |
|
inlinevirtual |
Implements svg::element_base.
Definition at line 827 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 806 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 805 of file a60-svg-elements.h.
struct svg::circle_element::data |
Definition at line 796 of file a60-svg-elements.h.
Public Attributes | |
atype | _M_radius |
atype | _M_x_origin |
atype | _M_y_origin |
atype svg::circle_element::data::_M_radius |
Definition at line 800 of file a60-svg-elements.h.
atype svg::circle_element::data::_M_x_origin |
Definition at line 798 of file a60-svg-elements.h.
atype svg::circle_element::data::_M_y_origin |
Definition at line 799 of file a60-svg-elements.h.
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 196 of file a60-svg-elements.h.
Public Member Functions | |
void | finish_element () |
void | start_element () |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Static Public Member Functions | |
static string | finish_defs () |
static string | start_defs () |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 203 of file a60-svg-elements.h.
|
inlinestatic |
Definition at line 199 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 207 of file a60-svg-elements.h.
struct svg::desc_element |
Description SVG element.
Specification reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/desc
Definition at line 583 of file a60-svg-elements.h.
Public Member Functions | |
void | finish_element () |
void | start_element () |
void | start_element (const string dsc) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 586 of file a60-svg-elements.h.
|
inline |
Definition at line 589 of file a60-svg-elements.h.
struct svg::element_base |
Abstract base class for all SVG Elements.
Definition at line 31 of file a60-svg-elements.h.
Public Types | |
using | atype = space_type |
using | stream_type = std::ostringstream |
Public Member Functions | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
virtual void | finish_element ()=0 |
virtual void | start_element ()=0 |
void | store_element (const element_base &e) |
string | str () const |
void | str (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::atype = space_type |
Definition at line 39 of file a60-svg-elements.h.
using svg::element_base::stream_type = std::ostringstream |
Definition at line 33 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 |
Empty when the output buffer is.
Definition at line 53 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 |
Definition at line 56 of file a60-svg-elements.h.
|
inline |
Definition at line 59 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.
|
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.
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 286 of file a60-svg-elements.h.
Public Types | |
enum class | type { feBlend , feImage , feOffset , feGaussianBlur , feColorMatrix , feComponentTransfer } |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
Public Member Functions | |
void | add_data (const string fltr) |
void | finish_element () |
string | gaussian_blur (string dev) |
string | gaussian_blur (string in, string dev) |
void | start_element () |
void | start_element (const string id) |
void | start_element (const string id, const area<> blur_area, const point_2t p) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 288 of file a60-svg-elements.h.
|
inline |
Definition at line 329 of file a60-svg-elements.h.
|
inline |
|
inline |
Definition at line 336 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 299 of file a60-svg-elements.h.
|
inline |
Definition at line 303 of file a60-svg-elements.h.
|
inline |
Definition at line 312 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 1189 of file a60-svg-elements.h.
Public Member Functions | |
void | finish_element () |
void | start_element () |
void | start_element (const point_2t origin, const area<> av, const area<> arect, const point_2t scale=std::make_tuple(1.0, 1.0)) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 1192 of file a60-svg-elements.h.
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 369 of file a60-svg-elements.h.
Public Types | |
enum class | type { linearGradient , meshgradient , radialGradient , stop } |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
Public Member Functions | |
void | finish_element () |
const string | offset_percentage (const ssize_type numer, const ssize_type denom) |
void | start_element () |
void | stop (const string off, const color &klr, const double opacity=1.0) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
static string | finish_defs () |
static string | start_defs () |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 371 of file a60-svg-elements.h.
|
inline |
Definition at line 403 of file a60-svg-elements.h.
|
inlinevirtual |
Reimplemented from svg::defs_element.
Reimplemented in svg::linear_gradient, and svg::radial_gradient.
Definition at line 380 of file a60-svg-elements.h.
|
inline |
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 117 of file a60-svg-elements.h.
Public Member Functions | |
void | finish_element () |
void | start_element () |
void | start_element (string name) |
For groups of elements that have the same name. | |
void | start_element (string name, const style &sty) |
void | start_element (string name, const transform, const string ts, const style &sty=k::no_style) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Static Public Member Functions | |
static string | finish_group () |
static string | start_group (const string name="") |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 136 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 140 of file a60-svg-elements.h.
|
inline |
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.
Definition at line 150 of file a60-svg-elements.h.
|
inline |
|
inlinestatic |
Definition at line 120 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 1305 of file a60-svg-elements.h.
Public Member Functions | |
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 () |
void | start_element () |
void | start_element (const string &id) |
![]() | |
void | start_element (const point_2t origin, const area<> av, const area<> arect, const point_2t scale=std::make_tuple(1.0, 1.0)) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 |
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 1326 of file a60-svg-elements.h.
|
inlinevirtual |
Reimplemented from svg::foreign_element.
Definition at line 1318 of file a60-svg-elements.h.
|
inline |
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 1091 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 | add_data (const data &d, const string vattr, const string cors) |
Visibility and other HTML/img attributes. | |
void | finish_element () |
void | start_element () |
void | start_element (const string &id) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 1121 of file a60-svg-elements.h.
|
inline |
Visibility and other HTML/img attributes.
vattr | = visibility attribute, "visible" or "hidden" |
cors | = CORS, "anonymous" or "use-credentials" |
lattr | = loading attribute, "lazy" or "eager" |
Definition at line 1145 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 1112 of file a60-svg-elements.h.
|
inline |
struct svg::image_element::data |
Definition at line 1093 of file a60-svg-elements.h.
Public Attributes | |
atype | _M_height |
atype | _M_width |
atype | _M_x_origin |
string | _M_xref |
atype | _M_y_origin |
atype svg::image_element::data::_M_height |
Definition at line 1099 of file a60-svg-elements.h.
atype svg::image_element::data::_M_width |
Definition at line 1098 of file a60-svg-elements.h.
atype svg::image_element::data::_M_x_origin |
Definition at line 1096 of file a60-svg-elements.h.
string svg::image_element::data::_M_xref |
Definition at line 1095 of file a60-svg-elements.h.
atype svg::image_element::data::_M_y_origin |
Definition at line 1097 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 849 of file a60-svg-elements.h.
Public Member Functions | |
void | add_data (const data &d, const string dasharray="") |
void | finish_element () |
void | start_element () |
void | start_element (string name) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 888 of file a60-svg-elements.h.
|
inline |
Definition at line 892 of file a60-svg-elements.h.
struct svg::line_element::data |
Definition at line 851 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 853 of file a60-svg-elements.h.
atype svg::line_element::data::_M_x_end |
Definition at line 854 of file a60-svg-elements.h.
atype svg::line_element::data::_M_y_begin |
Definition at line 855 of file a60-svg-elements.h.
atype svg::line_element::data::_M_y_end |
Definition at line 856 of file a60-svg-elements.h.
struct svg::linear_gradient |
Linear gradients https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient.
Definition at line 481 of file a60-svg-elements.h.
Public Member Functions | |
void | finish_element () |
void | start_element () |
![]() | |
const string | offset_percentage (const ssize_type numer, const ssize_type denom) |
void | stop (const string off, const color &klr, const double opacity=1.0) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
enum class | type { linearGradient , meshgradient , radialGradient , stop } |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
static string | finish_defs () |
static string | start_defs () |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 484 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 236 of file a60-svg-elements.h.
Public Member Functions | |
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. | |
void | finish_element () |
void | start_element () |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 246 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 258 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 239 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 515 of file a60-svg-elements.h.
Public Member Functions | |
void | finish_element () |
void | start_element () |
void | start_element (const string id, const area<> a, const point_2t p) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 518 of file a60-svg-elements.h.
|
inline |
Definition at line 522 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 1359 of file a60-svg-elements.h.
Public Member Functions | |
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 () |
void | start_element () |
void | start_element (const string &id) |
![]() | |
void | start_element (const point_2t origin, const area<> av, const area<> arect, const point_2t scale=std::make_tuple(1.0, 1.0)) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 |
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 1381 of file a60-svg-elements.h.
|
inlinevirtual |
Reimplemented from svg::foreign_element.
Definition at line 1372 of file a60-svg-elements.h.
|
inline |
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 994 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 | finish_element () |
void | start_element () |
void | start_element (const string name) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Static Public Attributes | |
static constexpr const char * | pair_finish_tag = "</path>" |
![]() | |
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 | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
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 1007 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 1020 of file a60-svg-elements.h.
|
inline |
Definition at line 1024 of file a60-svg-elements.h.
|
staticconstexpr |
Definition at line 1002 of file a60-svg-elements.h.
struct svg::path_element::data |
Definition at line 996 of file a60-svg-elements.h.
Public Attributes | |
string | _M_d |
atype | _M_length |
string svg::path_element::data::_M_d |
Definition at line 998 of file a60-svg-elements.h.
atype svg::path_element::data::_M_length |
Definition at line 999 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 913 of file a60-svg-elements.h.
Public Member Functions | |
polyline_element () | |
polyline_element (const vrange &points) | |
void | add_data (const stroke_style &sstyl) |
void | finish_element () |
void | start_element () |
void | start_element (string name) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Public Attributes | |
vrange | polypoints |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
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 918 of file a60-svg-elements.h.
|
inline |
Definition at line 920 of file a60-svg-elements.h.
|
inline |
Definition at line 925 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 968 of file a60-svg-elements.h.
|
inline |
Definition at line 972 of file a60-svg-elements.h.
vrange svg::polyline_element::polypoints |
Definition at line 916 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 418 of file a60-svg-elements.h.
Public Member Functions | |
void | finish_element () |
void | start_element () |
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 | start_element (const string id, const ssize_type radius=0, const ssize_type cx=0, const ssize_type cy=0) |
![]() | |
const string | offset_percentage (const ssize_type numer, const ssize_type denom) |
void | stop (const string off, const color &klr, const double opacity=1.0) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
enum class | type { linearGradient , meshgradient , radialGradient , stop } |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
static string | finish_defs () |
static string | start_defs () |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 421 of file a60-svg-elements.h.
|
inline |
|
inline |
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 737 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 | finish_element () |
void | start_element () |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Static Public Attributes | |
static constexpr const char * | pair_finish_tag = "</rect>" |
static constexpr const char * | pair_open_tag = "<rect>" |
![]() | |
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 | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
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 755 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 749 of file a60-svg-elements.h.
struct svg::rect_element::data |
Definition at line 739 of file a60-svg-elements.h.
Public Attributes | |
atype | _M_height |
atype | _M_width |
atype | _M_x_origin |
atype | _M_y_origin |
atype svg::rect_element::data::_M_height |
Definition at line 744 of file a60-svg-elements.h.
atype svg::rect_element::data::_M_width |
Definition at line 743 of file a60-svg-elements.h.
atype svg::rect_element::data::_M_x_origin |
Definition at line 741 of file a60-svg-elements.h.
atype svg::rect_element::data::_M_y_origin |
Definition at line 742 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 1409 of file a60-svg-elements.h.
Public Member Functions | |
void | add_data (const string scriptstr) |
Add string with script source. | |
void | finish_element () |
void | start_element () |
void | start_element (const string &id) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Static Public Member Functions | |
static const string | tooltip_attribute (const string &id) |
static const string & | tooltip_script () |
showTooltip(id) hideTooltip(id) | |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 |
Add string with script source.
scriptstr | script source |
Definition at line 1460 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 1422 of file a60-svg-elements.h.
|
inline |
|
inlinestatic |
|
inlinestatic |
showTooltip(id) hideTooltip(id)
Definition at line 1428 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 1481 of file a60-svg-elements.h.
Public Types | |
using | area = svg::area<atype> |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
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 () | |
void | add_desc (const string desc) |
void | add_filters () |
void | add_title () |
const point_2t | center_point () |
void | finish () |
void | finish_element () |
void | start (const string &desc="") |
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 | write () |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Public Attributes | |
const area | _M_area |
const bool | _M_lifetime |
const string | _M_name |
const typography & | _M_typo |
const unit | _M_unit |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
Additional Inherited Members | |
![]() | |
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 1483 of file a60-svg-elements.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void svg::svg_element::add_filters | ( | ) |
|
inline |
|
inline |
Definition at line 1524 of file a60-svg-elements.h.
|
inline |
|
virtual |
Implements svg::element_base.
|
inline |
|
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 52 of file a60-svg-elements-components.h.
void svg::svg_element::start_element | ( | const point_2t | p, |
const area | destarea, | ||
const style & | sty = k::no_style ) |
void svg::svg_element::write | ( | ) |
Definition at line 32 of file a60-svg-elements-components.h.
const area svg::svg_element::_M_area |
Definition at line 1486 of file a60-svg-elements.h.
const bool svg::svg_element::_M_lifetime |
Definition at line 1489 of file a60-svg-elements.h.
const string svg::svg_element::_M_name |
Definition at line 1485 of file a60-svg-elements.h.
const typography& svg::svg_element::_M_typo |
Definition at line 1488 of file a60-svg-elements.h.
const unit svg::svg_element::_M_unit |
Definition at line 1487 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 610 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. | |
virtual void | add_text (string txt) |
void | finish_element () |
void | start_element () |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Static Public Member Functions | |
static string | finish_tspan () |
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 | 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) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 629 of file a60-svg-elements.h.
|
inlinevirtual |
Reimplemented in svg::text_path_element.
Definition at line 623 of file a60-svg-elements.h.
|
inlinestatic |
Definition at line 696 of file a60-svg-elements.h.
|
inlinevirtual |
Implements svg::element_base.
Definition at line 653 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 681 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 663 of file a60-svg-elements.h.
struct svg::text_element::data |
Definition at line 612 of file a60-svg-elements.h.
Public Attributes | |
string | _M_text |
typography | _M_typo |
atype | _M_x_origin |
atype | _M_y_origin |
string svg::text_element::data::_M_text |
Definition at line 616 of file a60-svg-elements.h.
typography svg::text_element::data::_M_typo |
Definition at line 617 of file a60-svg-elements.h.
atype svg::text_element::data::_M_x_origin |
Definition at line 614 of file a60-svg-elements.h.
atype svg::text_element::data::_M_y_origin |
Definition at line 615 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 1048 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) |
![]() | |
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 | finish_element () |
void | start_element () |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Public Attributes | |
string | offset |
string | path_name |
string | side |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
static string | finish_tspan () |
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 | 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 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 1054 of file a60-svg-elements.h.
|
inlinevirtual |
Reimplemented from svg::text_element.
Definition at line 1059 of file a60-svg-elements.h.
string svg::text_path_element::offset |
Definition at line 1051 of file a60-svg-elements.h.
string svg::text_path_element::path_name |
Definition at line 1050 of file a60-svg-elements.h.
string svg::text_path_element::side |
Definition at line 1052 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 555 of file a60-svg-elements.h.
Public Member Functions | |
void | finish_element () |
void | start_element () |
void | start_element (const string t) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 558 of file a60-svg-elements.h.
|
inline |
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 1247 of file a60-svg-elements.h.
Public Member Functions | |
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 () |
void | start_element () |
void | start_element (const string &id) |
![]() | |
void | start_element (const point_2t origin, const area<> av, const area<> arect, const point_2t scale=std::make_tuple(1.0, 1.0)) |
![]() | |
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) |
void | add_transform (const string s) |
Common transforms include rotate(180) | |
bool | empty () |
Empty when the output buffer is. | |
void | store_element (const element_base &e) |
string | str () const |
void | str (const string &s) |
Additional Inherited Members | |
![]() | |
using | atype = space_type |
using | stream_type = std::ostringstream |
![]() | |
stream_type | _M_sstream |
Virtual, only one buffer. | |
![]() | |
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 |
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 1275 of file a60-svg-elements.h.
|
inlinevirtual |
Reimplemented from svg::foreign_element.
Definition at line 1260 of file a60-svg-elements.h.
|
inline |
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 836 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 215 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 597 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 353 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 1238 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 412 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 183 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 1349 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 1155 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 900 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 496 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 272 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 539 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 1400 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 1032 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 980 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 472 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 781 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 1471 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 701 of file a60-svg-elements.h.
|
virtual |
#include </home/bkoz/src/izzi/src/a60-svg-elements.h>
Implements svg::element_base.
Definition at line 573 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 1296 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 707 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 219 of file a60-svg-elements.h.