|
| | element ()=default |
| | Constructs a null el.
|
| bool | has_attribute (const std::string &name) const |
| | Checks if the el has a specific attribute.
|
| const std::string & | attribute (const std::string &name) const |
| | Retrieves the value of an attribute.
|
| void | set_attribute (const std::string &name, const std::string &value) |
| | Sets the value of an attribute.
|
| void | render (stb::image &image, const stb::matrix &matrix=stb::matrix()) const |
| | Renders the el onto an existing image, using a transformation matrix.
|
| stb::image | render_to_image (int width=-1, int height=-1, const stb::color &background_color=stb::color(0, 0, 0, 0)) const |
| | Renders the el to a new straight-alpha RGBA image with specified dimensions.
|
| void | render (pixmap &bitmap, const stb::matrix &matrix=stb::matrix()) const |
| pixmap | render_to_pixmap (int width=-1, int height=-1, const stb::color &background_color=stb::color(0, 0, 0, 0)) const |
| stb::matrix | local_matrix () const |
| | Retrieves the local transformation matrix of the el.
|
| stb::matrix | global_matrix () const |
| | Retrieves the global transformation matrix of the el.
|
| box | local_bounding_box () const |
| | Retrieves the local bounding box of the el.
|
| box | global_bounding_box () const |
| | Retrieves the global bounding box of the el.
|
| box | bounding_box () const |
| | Retrieves the bounding box of the el without any transformations.
|
| node_list | children () const |
| | Returns the child nodes of this nd.
|
| | node ()=default |
| | Constructs a null nd.
|
| bool | is_text_node () const |
| | Checks if the nd is a text nd.
|
| bool | is_element () const |
| | Checks if the nd is an el nd.
|
| text_node | to_text_node () const |
| | Converts the nd to a text_node.
|
| element | to_element () const |
| | Converts the nd to an element.
|
| element | parent_element () const |
| | Returns the parent el.
|
| bool | is_null () const |
| | Checks if the nd is null.
|
| | operator bool () const |
| | Checks if the nd is not null.
|
| bool | operator== (const node &nd) const |
| | Checks if two nodes are equal.
|
| bool | operator!= (const node &nd) const |
| | Checks if two nodes are not equal.
|
Definition at line 192 of file svg.h.
| void nova::svg::element::render |
( |
stb::image & | image, |
|
|
const stb::matrix & | matrix = stb::matrix() ) const |
Renders the el onto an existing image, using a transformation matrix.
The el is drawn on a transparent layer the size of image and the layer is composited over the image's pixels with stb::image::blend (normal mode, "over" with straight alpha). Because the layer starts transparent, mix-blend-mode inside the el blends against the layer, not against what was already in image. Any pixel format is accepted; images larger than 32767 pixels on a side are left untouched.
- Parameters
-
| image | The image to render onto (changed in place). |
| matrix | The root transformation matrix. |