NovaSVG 0.10.0
A header-only SVG library
Loading...
Searching...
No Matches
novasvg::SVGRootElement Class Referencefinal

#include <svgelement.h>

Inheritance diagram for novasvg::SVGRootElement:
Collaboration diagram for novasvg::SVGRootElement:

Public Member Functions

 SVGRootElement (Document *document)
 
float intrinsicWidth () const
 
float intrinsicHeight () const
 
void setNeedsLayout ()
 
bool needsLayout () const
 
SVGRootElement * layoutIfNeeded ()
 
SVGElement * getElementById (std::string_view id) const
 
void addElementById (const std::string &id, SVGElement *element)
 
void layout (SVGLayoutState &state) final
 
void forceLayout ()
 
const std::vector< std::string > & styleSheets () const
 
void addStyleSheet (std::string text)
 
- Public Member Functions inherited from novasvg::SVGSVGElement
 SVGSVGElement (Document *document)
 
const SVGLength & x () const
 
const SVGLength & y () const
 
const SVGLength & width () const
 
const SVGLength & height () const
 
Transform localTransform () const override
 
void render (SVGRenderState &state) const override
 
- Public Member Functions inherited from novasvg::SVGGraphicsElement
 SVGGraphicsElement (Document *document, ElementID id)
 
bool isGraphicsElement () const final
 
const SVGTransform & transform () const
 
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 fillBoundingBox () const
 
virtual Rect strokeBoundingBox () 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 ()
 
virtual void layoutElement (const SVGLayoutState &state)
 
void layoutChildren (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
 
- Public Member Functions inherited from novasvg::SVGFitToViewBox
 SVGFitToViewBox (SVGElement *element)
 
const SVGRect & viewBox () const
 
const SVGPreserveAspectRatio & preserveAspectRatio () const
 
Transform viewBoxToViewTransform (const Size &viewportSize) const
 
Rect getClipRect (const Size &viewportSize) const
 

Additional Inherited Members

- Static Public Member Functions inherited from novasvg::SVGElement
static std::unique_ptr< SVGElement > create (Document *document, ElementID id)
 

Detailed Description

Definition at line 1048 of file svgelement.h.

Constructor & Destructor Documentation

◆ SVGRootElement()

NOVASVG_INLINE novasvg::SVGRootElement::SVGRootElement ( Document *  document)

Definition at line 5787 of file svgelement.h.

Member Function Documentation

◆ addElementById()

NOVASVG_INLINE void novasvg::SVGRootElement::addElementById ( const std::string &  id,
SVGElement *  element 
)

Definition at line 5807 of file svgelement.h.

◆ addStyleSheet()

void novasvg::SVGRootElement::addStyleSheet ( std::string  text)
inline

Definition at line 1071 of file svgelement.h.

References text.

◆ forceLayout()

NOVASVG_INLINE void novasvg::SVGRootElement::forceLayout ( )

Definition at line 5854 of file svgelement.h.

References layout().

Referenced by layoutIfNeeded().

◆ getElementById()

◆ intrinsicHeight()

float novasvg::SVGRootElement::intrinsicHeight ( ) const
inline

Definition at line 1053 of file svgelement.h.

Referenced by novasvg::Document::height(), and novasvg::Document::renderToBitmap().

◆ intrinsicWidth()

float novasvg::SVGRootElement::intrinsicWidth ( ) const
inline

Definition at line 1052 of file svgelement.h.

Referenced by novasvg::Document::renderToBitmap(), and novasvg::Document::width().

◆ layout()

◆ layoutIfNeeded()

NOVASVG_INLINE SVGRootElement * novasvg::SVGRootElement::layoutIfNeeded ( )

Definition at line 5792 of file svgelement.h.

References forceLayout(), and needsLayout().

◆ needsLayout()

bool novasvg::SVGRootElement::needsLayout ( ) const
inline

Definition at line 1056 of file svgelement.h.

Referenced by layoutIfNeeded().

◆ setNeedsLayout()

void novasvg::SVGRootElement::setNeedsLayout ( )
inline

◆ styleSheets()

const std::vector< std::string > & novasvg::SVGRootElement::styleSheets ( ) const
inline

Definition at line 1070 of file svgelement.h.


The documentation for this class was generated from the following file: