Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::svg::SVGFilterPrimitiveStandardAttributes Class Reference

Handles standard attributes for filter primitives, which are children of the "<filter>" element. More...

#include "donner/svg/SVGFilterPrimitiveStandardAttributes.h"

Inheritance diagram for donner::svg::SVGFilterPrimitiveStandardAttributes:
[legend]
Collaboration diagram for donner::svg::SVGFilterPrimitiveStandardAttributes:
[legend]

Public Member Functions

Lengthd x () const
 Get the top-left X coordinate of the filter region, which defines a rectangular region on the canvas to which this filter applies.
 
Lengthd y () const
 Get the top-left Y coordinate of the filter region, which defines a rectangular region on the canvas to which this filter applies.
 
Lengthd width () const
 Get the width of the filter region, which defines a rectangular region on the canvas to which this filter applies.
 
Lengthd height () const
 Get the height of the filter region, which defines a rectangular region on the canvas to which this filter applies.
 
void setX (const Lengthd &value)
 Set the top-left X coordinate of the filter region, which defines a rectangular region on the canvas to which this filter applies.
 
void setY (const Lengthd &value)
 Set the top-left Y coordinate of the filter region, which defines a rectangular region on the canvas to which this filter applies.
 
void setWidth (const Lengthd &value)
 Set the width of the filter region, which defines a rectangular region on the canvas to which this filter applies.
 
void setHeight (const Lengthd &value)
 Set the height of the filter region, which defines a rectangular region on the canvas to which this filter applies.
 
std::optional< RcStringresult () const
 Get the name of this filter primitive, which enables it to be referenced by a subsequent filter primitive within the same filter element.
 
void setResult (const RcStringOrRef &value)
 Set the name of this filter primitive, which enables it to be referenced by a subsequent filter primitive within the same filter element.
 
- Public Member Functions inherited from donner::svg::SVGElement
 SVGElement (const SVGElement &other)
 Create another reference to the same SVGElement.
 
 SVGElement (SVGElement &&other) noexcept
 Move constructor.
 
 ~SVGElement () noexcept=default
 Destructor.
 
SVGElementoperator= (const SVGElement &other)
 Create another reference to the same SVGElement.
 
SVGElementoperator= (SVGElement &&other) noexcept
 Move assignment operator.
 
ElementType type () const
 Get the ElementType for known XML element types.
 
XMLQualifiedNameRef tagName () const
 Get the XML tag name string for this element.
 
bool isKnownType () const
 Returns true if this is a known element type, returns false if this is an SVGUnknownElement.
 
Entity entity () const
 Get the underlying Entity, for advanced use-cases that require direct access to the ECS.
 
RcString id () const
 Get the element id, the value of the "id" attribute.
 
void setId (std::string_view id)
 Set the element id, the value of the "id" attribute.
 
RcString className () const
 Get the element class name, the value of the "class" attribute.
 
void setClassName (std::string_view name)
 Set the element class name, the value of the "class" attribute.
 
void setStyle (std::string_view style)
 Set the element style, the value of the "style" attribute.
 
base::parser::ParseResult< bool > trySetPresentationAttribute (std::string_view name, std::string_view value)
 Set the value of a presentation attribute, such as "fill" or "stroke".
 
bool hasAttribute (const XMLQualifiedNameRef &name) const
 Returns true if the element has an attribute with the given name.
 
std::optional< RcStringgetAttribute (const XMLQualifiedNameRef &name) const
 Get the value of an attribute, if it exists.
 
SmallVector< XMLQualifiedNameRef, 1 > findMatchingAttributes (const XMLQualifiedNameRef &matcher) const
 Find attributes matching the given name matcher.
 
void setAttribute (const XMLQualifiedNameRef &name, std::string_view value)
 Set the value of a generic XML attribute, which may be either a presentation attribute or custom user-provided attribute.
 
void removeAttribute (const XMLQualifiedNameRef &name)
 Remove an attribute, which may be either a presentation attribute or custom user-provided attribute.
 
SVGDocumentownerDocument ()
 Get the SVGDocument that holds this element.
 
std::optional< SVGElementparentElement () const
 Get this element's parent, if it exists.
 
std::optional< SVGElementfirstChild () const
 Get the first child of this element, if it exists.
 
std::optional< SVGElementlastChild () const
 Get the last child of this element, if it exists.
 
std::optional< SVGElementpreviousSibling () const
 Get the previous sibling of this element, if it exists.
 
std::optional< SVGElementnextSibling () const
 Get the next sibling of this element, if it exists.
 
SVGElement insertBefore (SVGElement newNode, std::optional< SVGElement > referenceNode)
 Insert newNode as a child, before referenceNode.
 
SVGElement appendChild (SVGElement child)
 Append child as a child of the current node.
 
SVGElement replaceChild (SVGElement newChild, SVGElement oldChild)
 Replace oldChild with newChild in the tree, removing oldChild and inserting newChild in its place.
 
SVGElement removeChild (SVGElement child)
 Remove child from this node.
 
void remove ()
 Remove this node from its parent, if it has one.
 
bool operator== (const SVGElement &other) const
 Returns true if the two SVGElement handles reference the same underlying document.
 
bool operator!= (const SVGElement &other) const
 Returns true if the two SVGElement handles reference the same underlying document.
 
template<typename Derived >
bool isa () const
 Return true if this element "is a" instance of type, if it be cast to a specific type with cast.
 
template<typename Derived >
Derived cast ()
 Cast this element to its derived type.
 
template<typename Derived >
Derived cast () const
 Cast this element to its derived type (const version).
 
template<typename Derived >
std::optional< Derived > tryCast ()
 Cast this element to its derived type, if possible.
 
template<typename Derived >
std::optional< const Derived > tryCast () const
 Cast this element to its derived type, if possible.
 
std::optional< SVGElementquerySelector (std::string_view selector)
 Find the first element in the tree that matches the given CSS selector.
 
const PropertyRegistrygetComputedStyle () const
 Get the computed CSS style of this element, after the CSS cascade.
 

Protected Member Functions

 SVGFilterPrimitiveStandardAttributes (EntityHandle handle)
 Inheriting constructor to be called by derived classes. SVGFilterPrimitiveStandardAttributes cannot be instantiated directly.
 
- Protected Member Functions inherited from donner::svg::SVGElement
 SVGElement (EntityHandle handle)
 Internal constructor to create an SVGElement from an EntityHandle.
 
Registryregistry () const
 Get the underlying ECS Registry, which holds all data for the document, for advanced use.
 
EntityHandle toHandle (Entity entity) const
 Convert an Entity to an EntityHandle, for advanced use.
 

Additional Inherited Members

- Static Protected Member Functions inherited from donner::svg::SVGElement
static EntityHandle CreateEntity (Registry &registry, const XMLQualifiedNameRef &tagName, ElementType Type)
 Create a new Entity of the given type.
 
- Protected Attributes inherited from donner::svg::SVGElement
EntityHandle handle_
 The underlying ECS Entity for this element, which holds all data.
 

Detailed Description

Handles standard attributes for filter primitives, which are children of the "<filter>" element.

See also
https://www.w3.org/TR/filter-effects/#InterfaceSVGFilterPrimitiveStandardAttributes

Member Function Documentation

◆ height()

Lengthd donner::svg::SVGFilterPrimitiveStandardAttributes::height ( ) const

Get the height of the filter region, which defines a rectangular region on the canvas to which this filter applies.

The initial value is '120'.

◆ result()

std::optional< RcString > donner::svg::SVGFilterPrimitiveStandardAttributes::result ( ) const

Get the name of this filter primitive, which enables it to be referenced by a subsequent filter primitive within the same filter element.

If no value is provided, the output will only be available for re-use as the implicit input into the next filter primitive if that filter primitive provides no value for its in attribute.

◆ setHeight()

void donner::svg::SVGFilterPrimitiveStandardAttributes::setHeight ( const Lengthd & value)

Set the height of the filter region, which defines a rectangular region on the canvas to which this filter applies.

The initial value is '120'.

Parameters
valueDimension value.

◆ setResult()

void donner::svg::SVGFilterPrimitiveStandardAttributes::setResult ( const RcStringOrRef & value)

Set the name of this filter primitive, which enables it to be referenced by a subsequent filter primitive within the same filter element.

If no value is provided, the output will only be available for re-use as the implicit input into the next filter primitive if that filter primitive provides no value for its in attribute.

◆ setWidth()

void donner::svg::SVGFilterPrimitiveStandardAttributes::setWidth ( const Lengthd & value)

Set the width of the filter region, which defines a rectangular region on the canvas to which this filter applies.

The initial value is '120'.

Parameters
valueDimension value.

◆ setX()

void donner::svg::SVGFilterPrimitiveStandardAttributes::setX ( const Lengthd & value)

Set the top-left X coordinate of the filter region, which defines a rectangular region on the canvas to which this filter applies.

The initial value is '-10'.

Parameters
valueCoordinate value.

◆ setY()

void donner::svg::SVGFilterPrimitiveStandardAttributes::setY ( const Lengthd & value)

Set the top-left Y coordinate of the filter region, which defines a rectangular region on the canvas to which this filter applies.

The initial value is '-10'.

Parameters
valueCoordinate value.

◆ width()

Lengthd donner::svg::SVGFilterPrimitiveStandardAttributes::width ( ) const

Get the width of the filter region, which defines a rectangular region on the canvas to which this filter applies.

The initial value is '120'.

◆ x()

Lengthd donner::svg::SVGFilterPrimitiveStandardAttributes::x ( ) const

Get the top-left X coordinate of the filter region, which defines a rectangular region on the canvas to which this filter applies.

The initial value is '-10'.

◆ y()

Lengthd donner::svg::SVGFilterPrimitiveStandardAttributes::y ( ) const

Get the top-left Y coordinate of the filter region, which defines a rectangular region on the canvas to which this filter applies.

The initial value is '-10'.


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