|
NovaSVG 0.10.0
A header-only SVG library
|
#include <svgelement.h>


Public Member Functions | |
| SVGForeignObjectElement (Document *document) | |
| const SVGLength & | x () const |
| const SVGLength & | y () const |
| const SVGLength & | width () const |
| const SVGLength & | height () const |
| const Font & | font () const |
| const SVGPaintServer & | fill () const |
| unsigned char | baseFontStyle () const |
| Bold/italic bits (ForeignObjectFonts::Bold/Italic) the element itself inherits, i.e. the style of font(). | |
| ForeignObjectFonts | fontsFor (unsigned usedStyles) const |
| const std::string & | rawContent () const |
| Raw markup captured between <foreignObject ...> and </foreignObject> (whatever HTML/XML the document embedded there), exactly as it appeared in the source – untouched, unparsed. What a ForeignObjectRenderer does with it is entirely up to that renderer. | |
| void | setRawContent (std::string content) |
| ForeignObjectRenderer * | renderer () const |
| void | setRenderer (ForeignObjectRenderer *renderer) |
| const std::optional< Color > & | htmlTextColor () const |
| const std::optional< Color > & | htmlBackgroundColor () const |
| void | setHtmlStyle (std::optional< Color > text, std::optional< Color > background) |
| Rect | fillBoundingBox () const final |
| Rect | strokeBoundingBox () const final |
| void | layoutElement (const SVGLayoutState &state) final |
| void | render (SVGRenderState &state) const final |
Public Member Functions inherited from novasvg::SVGGraphicsElement | |
| SVGGraphicsElement (Document *document, ElementID id) | |
| bool | isGraphicsElement () const final |
| const SVGTransform & | transform () const |
| Transform | localTransform () const override |
| SVGPaintServer | getPaintServer (const Paint &paint, float opacity) const |
| StrokeData | getStrokeData (const SVGLayoutState &state) const |
Public Member Functions inherited from novasvg::SVGElement | |
| SVGElement (Document *document, ElementID id) | |
| virtual | ~SVGElement ()=default |
| bool | hasAttribute (std::string_view name) const |
| const std::string & | getAttribute (std::string_view name) const |
| bool | setAttribute (std::string_view name, const std::string &value) |
| const Attribute * | findAttribute (PropertyID id) const |
| bool | hasAttribute (PropertyID id) const |
| const std::string & | getAttribute (PropertyID id) const |
| bool | setAttribute (int specificity, PropertyID id, const std::string &value) |
| void | setAttributes (const AttributeList &attributes) |
| bool | setAttribute (const Attribute &attribute) |
| virtual void | parseAttribute (PropertyID id, const std::string &value) |
| SVGElement * | previousElement () const |
| SVGElement * | nextElement () const |
| SVGNode * | addChild (std::unique_ptr< SVGNode > child) |
| SVGNode * | firstChild () const |
| SVGNode * | lastChild () const |
| ElementID | id () const |
| const AttributeList & | attributes () const |
| const SVGPropertyList & | properties () const |
| const SVGNodeList & | children () const |
| virtual Rect | paintBoundingBox () const |
| SVGMarkerElement * | getMarker (std::string_view id) const |
| SVGClipPathElement * | getClipper (std::string_view id) const |
| SVGMaskElement * | getMasker (std::string_view id) const |
| SVGFilterElement * | getFilterElement (std::string_view id) const |
| SVGPaintElement * | getPainter (std::string_view id) const |
| SVGElement * | elementFromPoint (float x, float y) |
| template<typename T > | |
| void | transverse (T callback) |
| void | addProperty (SVGProperty &value) |
| SVGProperty * | getProperty (PropertyID id) const |
| Size | currentViewportSize () const |
| float | font_size () const |
| void | cloneChildren (SVGElement *parentElement) const |
| std::unique_ptr< SVGNode > | clone (bool deep) const final |
| virtual void | build () |
| void | layoutChildren (SVGLayoutState &state) |
| virtual void | layout (SVGLayoutState &state) |
| void | renderChildren (SVGRenderState &state) const |
| virtual std::shared_ptr< Canvas > | applyFilterPrimitive (SVGFilterContext &context) const |
| bool | isDisplayNone () const |
| bool | isOverflowHidden () const |
| bool | isVisibilityHidden () const |
| bool | isHiddenElement () const |
| bool | isPointableElement () const |
| const SVGClipPathElement * | clipper () const |
| const SVGMaskElement * | masker () const |
| const SVGFilterElement * | filterElement () const |
| float | opacity () const |
| MixBlendMode | mixBlendMode () const |
| bool | isElement () const final |
Public Member Functions inherited from novasvg::SVGNode | |
| SVGNode (Document *document) | |
| virtual | ~SVGNode ()=default |
| virtual bool | isTextNode () const |
| virtual bool | isPaintElement () const |
| virtual bool | isGeometryElement () const |
| virtual bool | isTextPositioningElement () const |
| Document * | document () const |
| SVGRootElement * | rootElement () const |
| SVGElement * | parentElement () const |
| void | setParentElement (SVGElement *parent) |
| bool | isRootElement () const |
Additional Inherited Members | |
Static Public Member Functions inherited from novasvg::SVGElement | |
| static std::unique_ptr< SVGElement > | create (Document *document, ElementID id) |
Definition at line 1179 of file svgelement.h.
| NOVASVG_INLINE novasvg::SVGForeignObjectElement::SVGForeignObjectElement | ( | Document * | document | ) |
Definition at line 6042 of file svgelement.h.
References novasvg::SVGElement::addProperty().
Bold/italic bits (ForeignObjectFonts::Bold/Italic) the element itself inherits, i.e. the style of font().
Definition at line 1191 of file svgelement.h.
Referenced by novasvg::ForeignObjectSimple::render().
|
inline |
Definition at line 1188 of file svgelement.h.
|
finalvirtual |
Reimplemented from novasvg::SVGElement.
Definition at line 6055 of file svgelement.h.
References width().
Referenced by novasvg::ForeignObjectSimple::render(), and strokeBoundingBox().
Definition at line 1187 of file svgelement.h.
Referenced by novasvg::ForeignObjectSimple::render().
| NOVASVG_INLINE ForeignObjectFonts novasvg::SVGForeignObjectElement::fontsFor | ( | unsigned | usedStyles | ) | const |
font() plus the variants named by usedStyles (a bit mask: bit n set = style n is needed). Nothing is looked up for styles that are not in the mask, so unstyled text costs nothing extra.
Definition at line 6071 of file svgelement.h.
References novasvg::ForeignObjectFonts::Bold, novasvg::ForeignObjectFonts::Italic, novasvg::makeFont(), novasvg::Font::size(), style, and width().
Referenced by novasvg::ForeignObjectSimple::render().
Definition at line 1186 of file svgelement.h.
|
inline |
Definition at line 1214 of file svgelement.h.
Referenced by novasvg::ForeignObjectSimple::render().
The text colour and the box colour the document's CSS gives this element's HTML, worked out when a stylesheet is applied (see resolveForeignObjectStyle()). Unset = nothing in the CSS asked for one (text is then black, and no box is painted).
Definition at line 1213 of file svgelement.h.
Referenced by novasvg::ForeignObjectSimple::render().
|
finalvirtual |
Reimplemented from novasvg::SVGElement.
Definition at line 6088 of file svgelement.h.
References novasvg::Bold, novasvg::ForeignObjectFonts::Bold, novasvg::SVGGraphicsElement::getPaintServer(), novasvg::Italic, novasvg::ForeignObjectFonts::Italic, novasvg::SVGElement::layoutElement(), and width().
|
inline |
Raw markup captured between <foreignObject ...> and </foreignObject> (whatever HTML/XML the document embedded there), exactly as it appeared in the source – untouched, unparsed. What a ForeignObjectRenderer does with it is entirely up to that renderer.
Definition at line 1202 of file svgelement.h.
Referenced by novasvg::ForeignObjectSimple::render().
|
finalvirtual |
Reimplemented from novasvg::SVGElement.
Definition at line 6098 of file svgelement.h.
References novasvg::ForeignObjectSimple::instance(), novasvg::SVGElement::isDisplayNone(), novasvg::SVGElement::isVisibilityHidden(), novasvg::SVGGraphicsElement::localTransform(), novasvg::ForeignObjectRenderer::render(), renderer(), and width().
|
inline |
Definition at line 1205 of file svgelement.h.
Referenced by render().
|
inline |
Definition at line 1215 of file svgelement.h.
References text.
|
inline |
Definition at line 1203 of file svgelement.h.
|
inline |
Definition at line 1206 of file svgelement.h.
|
finalvirtual |
Reimplemented from novasvg::SVGElement.
Definition at line 6066 of file svgelement.h.
References fillBoundingBox().
|
inline |
Definition at line 1185 of file svgelement.h.
Referenced by fillBoundingBox(), fontsFor(), layoutElement(), and render().
Definition at line 1183 of file svgelement.h.
Definition at line 1184 of file svgelement.h.