Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::Windows::Graphics::SvgElement Class Reference

#include <HWGraphics.h>

Inheritance diagram for Harlinn::Windows::Graphics::SvgElement:
[legend]
Collaboration diagram for Harlinn::Windows::Graphics::SvgElement:
[legend]

Public Member Functions

void GetDocument (ID2D1SvgDocument **document) const
 Gets the document that contains this element. Returns null if the element has been removed from the tree.
 
SvgDocument GetDocument () const
 
void GetTagName (PWSTR name, UINT32 nameCount) const
 Gets the tag name.
 
WideString GetTagName () const
 
UINT32 GetTagNameLength () const
 Gets the string length of the tag name. The returned string length does not include room for the null terminator.
 
bool IsTextContent () const
 Returns TRUE if this element represents text content, e.g. the content of a 'title' or 'desc' element. Text content does not have a tag name.
 
void GetParent (ID2D1SvgElement **parent) const
 Gets the parent element.
 
SvgElement GetParent () const
 
bool HasChildren () const
 Returns whether this element has children.
 
void GetFirstChild (ID2D1SvgElement **child) const
 Gets the first child of this element.
 
SvgElement GetFirstChild () const
 
void GetLastChild (ID2D1SvgElement **child) const
 Gets the last child of this element.
 
SvgElement GetLastChild () const
 
void GetPreviousChild (_In_ ID2D1SvgElement *referenceChild, ID2D1SvgElement **previousChild) const
 Gets the previous sibling of the referenceChild element.
 
void GetPreviousChild (const SvgElement &referenceChild, ID2D1SvgElement **previousChild) const
 
SvgElement GetPreviousChild (_In_ ID2D1SvgElement *referenceChild) const
 
SvgElement GetPreviousChild (const SvgElement &referenceChild) const
 
void GetNextChild (_In_ ID2D1SvgElement *referenceChild, ID2D1SvgElement **nextChild) const
 Gets the next sibling of the referenceChild element.
 
void GetNextChild (const SvgElement &referenceChild, ID2D1SvgElement **nextChild) const
 
SvgElement GetNextChild (_In_ ID2D1SvgElement *referenceChild) const
 
SvgElement GetNextChild (const SvgElement &referenceChild) const
 
void InsertChildBefore (_In_ ID2D1SvgElement *newChild, _In_opt_ ID2D1SvgElement *referenceChild=nullptr) const
 Inserts newChild as a child of this element, before the referenceChild element. If the newChild element already has a parent, it is removed from this parent as part of the insertion. Returns an error if this element cannot accept children of the type of newChild. Returns an error if the newChild is an ancestor of this element.
 
void InsertChildBefore (const SvgElement &newChild, _In_opt_ ID2D1SvgElement *referenceChild=nullptr) const
 
void InsertChildBefore (const SvgElement &newChild, const SvgElement &referenceChild) const
 
void AppendChild (_In_ ID2D1SvgElement *newChild) const
 Appends newChild to the list of children. If the newChild element already has a parent, it is removed from this parent as part of the append operation. Returns an error if this element cannot accept children of the type of newChild. Returns an error if the newChild is an ancestor of this element.
 
void AppendChild (const SvgElement &newChild) const
 
void ReplaceChild (_In_ ID2D1SvgElement *newChild, _In_ ID2D1SvgElement *oldChild) const
 Replaces the oldChild element with the newChild. This operation removes the oldChild from the tree. If the newChild element already has a parent, it is removed from this parent as part of the replace operation. Returns an error if this element cannot accept children of the type of newChild. Returns an error if the newChild is an ancestor of this element.
 
void ReplaceChild (const SvgElement &newChild, _In_ ID2D1SvgElement *oldChild) const
 
void ReplaceChild (_In_ ID2D1SvgElement *newChild, const SvgElement &oldChild) const
 
void ReplaceChild (const SvgElement &newChild, const SvgElement &oldChild) const
 
void RemoveChild (_In_ ID2D1SvgElement *oldChild) const
 Removes the oldChild from the tree. Children of oldChild remain children of oldChild.
 
void RemoveChild (const SvgElement &oldChild) const
 
void CreateChild (_In_ PCWSTR tagName, ID2D1SvgElement **newChild) const
 Creates an element from a tag name. The element is appended to the list of children. Returns an error if this element cannot accept children of the specified type.
 
SvgElement CreateChild (_In_ PCWSTR tagName) const
 
bool IsAttributeSpecified (_In_ PCWSTR name, BOOL *inherited=NULL) const
 Returns true if the attribute is explicitly set on the element or if it is present within an inline style. Returns FALSE if the attribute is not a valid attribute on this element.
 
UINT32 GetSpecifiedAttributeCount () const
 Returns the number of specified attributes on this element. Attributes are only considered specified if they are explicitly set on the element or present within an inline style. Properties that receive their value through CSS inheritance are not considered specified. An attribute can become specified if it is set through a method call. It can become unspecified if it is removed via RemoveAttribute.
 
void GetSpecifiedAttributeName (UINT32 index, PWSTR name, UINT32 nameCount, _Out_opt_ BOOL *inherited=nullptr) const
 Gets the name of the specified attribute at the given index.
 
WideString GetSpecifiedAttributeName (UINT32 index, _Out_opt_ BOOL *inherited=nullptr) const
 
void GetSpecifiedAttributeNameLength (UINT32 index, _Out_ UINT32 *nameLength, _Out_opt_ BOOL *inherited=nullptr) const
 Gets the string length of the name of the specified attribute at the given index. The output string length does not include room for the null terminator.
 
UINT32 GetSpecifiedAttributeNameLength (UINT32 index, _Out_opt_ BOOL *inherited=nullptr) const
 
void RemoveAttribute (_In_ PCWSTR name) const
 Removes the attribute from this element. Also removes this attribute from within an inline style if present. Returns an error if the attribute name is not valid on this element.
 
void SetTextValue (const WCHAR *value, UINT32 valueCount) const
 Sets the value of a text content element.
 
void SetTextValue (const WideString &value) const
 
void SetTextValue (const std::wstring_view &value) const
 
void GetTextValue (PWSTR value, UINT32 valueCount) const
 Gets the value of a text content element.
 
WideString GetTextValue () const
 
UINT32 GetTextValueLength () const
 Gets the length of the text content value. The returned string length does not include room for the null terminator.
 
void SetAttributeValue (_In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type, _In_ PCWSTR value) const
 Sets an attribute of this element using a string. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified type.
 
void GetAttributeValue (_In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type, PWSTR value, UINT32 valueCount) const
 Gets an attribute of this element as a string. Returns an error if the attribute is not specified. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified string type.
 
WideString GetAttributeValue (_In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type=D2D1_SVG_ATTRIBUTE_STRING_TYPE_SVG) const
 
void GetAttributeValueLength (_In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type, _Out_ UINT32 *valueLength) const
 Gets the string length of an attribute of this element. The returned string length does not include room for the null terminator. Returns an error if the attribute is not specified. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified string type.
 
UINT32 GetAttributeValueLength (_In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type) const
 
void SetAttributeValue (_In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_POD_TYPE type, const void *value, UINT32 valueSizeInBytes) const
 Sets an attribute of this element using a POD type. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified type.
 
void GetAttributeValue (_In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_POD_TYPE type, void *value, UINT32 valueSizeInBytes) const
 Gets an attribute of this element as a POD type. Returns an error if the attribute is not specified. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified POD type.
 
void SetAttributeValue (_In_ PCWSTR name, _In_ ID2D1SvgAttribute *value) const
 Sets an attribute of this element using an interface. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified interface type. Returns an error if the attribute object is already set on an element. A given attribute object may only be set on one element in one attribute location at a time.
 
void GetAttributeValue (_In_ PCWSTR name, _In_ REFIID riid, void **value) const
 Gets an attribute of this element as an interface type. Returns an error if the attribute is not specified. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified interface type.
 
void SetAttributeValue (_In_ PCWSTR name, FLOAT value) const
 Sets an attribute of this element using a float.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ FLOAT *value) const
 Gets an attribute of this element as a float.
 
void SetAttributeValue (_In_ PCWSTR name, CONST D2D1_COLOR_F &value) const
 Sets an attribute of this element as a color.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_COLOR_F *value) const
 Gets an attribute of this element as a color.
 
void SetAttributeValue (_In_ PCWSTR name, D2D1_FILL_MODE value) const
 Sets an attribute of this element as a fill mode. This method can be used to set the value of the 'fill-rule' or 'clip-rule' properties.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_FILL_MODE *value) const
 Gets an attribute of this element as a fill mode. This method can be used to get the value of the 'fill-rule' or 'clip-rule' properties.
 
void SetAttributeValue (_In_ PCWSTR name, D2D1_SVG_DISPLAY value) const
 Sets an attribute of this element as a display value. This method can be used to set the value of the 'display' property.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_SVG_DISPLAY *value) const
 Gets an attribute of this element as a display value. This method can be used to get the value of the 'display' property.
 
void SetAttributeValue (_In_ PCWSTR name, D2D1_SVG_OVERFLOW value) const
 Sets an attribute of this element as an overflow value. This method can be used to set the value of the 'overflow' property.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_SVG_OVERFLOW *value) const
 Gets an attribute of this element as an overflow value. This method can be used to get the value of the 'overflow' property.
 
void SetAttributeValue (_In_ PCWSTR name, D2D1_SVG_LINE_JOIN value) const
 Sets an attribute of this element as a line join value. This method can be used to set the value of the 'stroke-linejoin' property.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_SVG_LINE_JOIN *value) const
 Gets an attribute of this element as a line join value. This method can be used to get the value of the 'stroke-linejoin' property.
 
void SetAttributeValue (_In_ PCWSTR name, D2D1_SVG_LINE_CAP value) const
 Sets an attribute of this element as a line cap value. This method can be used to set the value of the 'stroke-linecap' property.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_SVG_LINE_CAP *value) const
 Gets an attribute of this element as a line cap value. This method can be used to get the value of the 'stroke-linecap' property.
 
void SetAttributeValue (_In_ PCWSTR name, D2D1_SVG_VISIBILITY value) const
 Sets an attribute of this element as a visibility value. This method can be used to set the value of the 'visibility' property.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_SVG_VISIBILITY *value) const
 Gets an attribute of this element as a visibility value. This method can be used to get the value of the 'visibility' property.
 
void SetAttributeValue (_In_ PCWSTR name, const D2D1_MATRIX_3X2_F &value)
 Sets an attribute of this element as a matrix value. This method can be used to set the value of a 'transform' or 'gradientTransform' attribute.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_MATRIX_3X2_F *value) const
 Gets an attribute of this element as a matrix value. This method can be used to get the value of a 'transform' or 'gradientTransform' attribute.
 
void SetAttributeValue (_In_ PCWSTR name, D2D1_SVG_UNIT_TYPE value) const
 Sets an attribute of this element as a unit type value. This method can be used to set the value of a 'gradientUnits' or 'clipPathUnits' attribute.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_SVG_UNIT_TYPE *value) const
 Gets an attribute of this element as a unit type value. This method can be used to get the value of a 'gradientUnits' or 'clipPathUnits' attribute.
 
void SetAttributeValue (_In_ PCWSTR name, D2D1_EXTEND_MODE value) const
 Sets an attribute of this element as an extend mode value. This method can be used to set the value of a 'spreadMethod' attribute.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_EXTEND_MODE *value) const
 Gets an attribute of this element as a extend mode value. This method can be used to get the value of a 'spreadMethod' attribute.
 
void SetAttributeValue (_In_ PCWSTR name, CONST D2D1_SVG_PRESERVE_ASPECT_RATIO &value) const
 Sets an attribute of this element as a preserve aspect ratio value. This method can be used to set the value of a 'preserveAspectRatio' attribute.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_SVG_PRESERVE_ASPECT_RATIO *value) const
 Gets an attribute of this element as a preserve aspect ratio value. This method can be used to get the value of a 'preserveAspectRatio' attribute.
 
void SetAttributeValue (_In_ PCWSTR name, const D2D1_SVG_LENGTH &value) const
 Sets an attribute of this element as a length value.
 
void GetAttributeValue (_In_ PCWSTR name, _Out_ D2D1_SVG_LENGTH *value) const
 Gets an attribute of this element as length value.
 
void GetAttributeValue (_In_ PCWSTR name, ID2D1SvgAttribute **value) const
 Gets an attribute of this element.
 
void GetAttributeValue (_In_ PCWSTR name, ID2D1SvgPaint **value) const
 Gets an attribute of this element as a paint. This method can be used to get the value of the 'fill' or 'stroke' properties.
 
void GetAttributeValue (_In_ PCWSTR name, ID2D1SvgStrokeDashArray **value) const
 Gets an attribute of this element as a stroke dash array. This method can be used to get the value of the 'stroke-dasharray' property.
 
void GetAttributeValue (_In_ PCWSTR name, ID2D1SvgPointCollection **value) const
 Gets an attribute of this element as points. This method can be used to get the value of the 'points' attribute on a 'polygon' or 'polyline' element.
 
void GetAttributeValue (_In_ PCWSTR name, ID2D1SvgPathData **value) const
 Gets an attribute of this element as path data. This method can be used to get the value of the 'd' attribute on a 'path' element.
 
- Public Member Functions inherited from Harlinn::Windows::Graphics::Resource
template<typename T = Factory>
requires std::is_base_of_v< Factory, T>
T GetFactory ()
 
- Public Member Functions inherited from Harlinn::Common::Core::Unknown
constexpr Unknown () noexcept
 
 Unknown (IUnknown *unknown, bool addref=false) noexcept
 
 Unknown (REFIID iid, const Unknown &unknown, bool throwIfNoInterface=true)
 
 Unknown (const Unknown &other) noexcept
 
 Unknown (Unknown &&other) noexcept
 
 ~Unknown () noexcept
 
constexpr operator bool () const noexcept
 
Unknownoperator= (const Unknown &other) noexcept
 
Unknownoperator= (Unknown &&other) noexcept
 
void swap (Unknown &other) noexcept
 
void ResetPtr (IUnknown *other=nullptr, bool addRef=false) noexcept
 
Unknownoperator= (nullptr_t)
 
IUnknown * Detach ()
 
template<typename T >
requires std::is_base_of_v<Unknown, T >
T As () const
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
bool Is () const noexcept
 
template<typename T >
requires std::is_base_of_v<IUnknown, T>
ComPtr< TAs () const
 
template<typename T >
requires std::is_base_of_v<IUnknown, T>
bool Is () const noexcept
 This function can be used to detect if an object supports a particular COM interface derived from IUnknown.
 
template<typename T = IUnknown>
TGetInterfacePointer () const noexcept
 
bool QueryInterface (REFIID riid, void **itf) const
 Queries a COM object for a pointer to one of its interface; identifying the interface by a reference to its interface identifier (IID). If the COM object implements the interface, then it returns a pointer to that interface after calling IUnknown::AddRef on it.
 
template<typename T >
requires std::is_base_of_v<IUnknown, T>
bool QueryInterface (T **itf) const
 
constexpr bool operator== (const Unknown &other) const noexcept
 
constexpr bool operator!= (const Unknown &other) const noexcept
 
constexpr bool operator== (const IUnknown *other) const noexcept
 
constexpr bool operator!= (const IUnknown *other) const noexcept
 

Additional Inherited Members

- Public Types inherited from Harlinn::Common::Core::Unknown
typedef IUnknown InterfaceType
 
- Static Public Member Functions inherited from Harlinn::Common::Core::Unknown
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromClassId (const CLSID &clsid, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromClassId (const wchar_t *clsid, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromClassId (const WideString &clsid, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromProgId (const wchar_t *progId, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromProgId (const WideString &progId, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromDll (const ModuleHandle &dll, const CLSID &clsid)
 
- Protected Attributes inherited from Harlinn::Common::Core::Unknown
IUnknown * unknown_
 

Member Function Documentation

◆ AppendChild() [1/2]

void Harlinn::Windows::Graphics::SvgElement::AppendChild ( _In_ ID2D1SvgElement * newChild) const
inline

Appends newChild to the list of children. If the newChild element already has a parent, it is removed from this parent as part of the append operation. Returns an error if this element cannot accept children of the type of newChild. Returns an error if the newChild is an ancestor of this element.

Parameters
newChildThe element to be appended.

◆ AppendChild() [2/2]

void Harlinn::Windows::Graphics::SvgElement::AppendChild ( const SvgElement & newChild) const
inline

◆ CreateChild() [1/2]

SvgElement Harlinn::Windows::Graphics::SvgElement::CreateChild ( _In_ PCWSTR tagName) const
inline

◆ CreateChild() [2/2]

void Harlinn::Windows::Graphics::SvgElement::CreateChild ( _In_ PCWSTR tagName,
ID2D1SvgElement ** newChild ) const
inline

Creates an element from a tag name. The element is appended to the list of children. Returns an error if this element cannot accept children of the specified type.

Parameters
tagNameThe tag name of the new child. An empty string is interpreted to be a text content element.
newChildThe new child element.

◆ GetAttributeValue() [1/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_In_ REFIID riid,
void ** value ) const
inline

Gets an attribute of this element as an interface type. Returns an error if the attribute is not specified. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified interface type.

Parameters
riidThe interface ID of the attribute value.

◆ GetAttributeValue() [2/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_COLOR_F * value ) const
inline

Gets an attribute of this element as a color.

◆ GetAttributeValue() [3/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_EXTEND_MODE * value ) const
inline

Gets an attribute of this element as a extend mode value. This method can be used to get the value of a 'spreadMethod' attribute.

◆ GetAttributeValue() [4/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_FILL_MODE * value ) const
inline

Gets an attribute of this element as a fill mode. This method can be used to get the value of the 'fill-rule' or 'clip-rule' properties.

◆ GetAttributeValue() [5/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_MATRIX_3X2_F * value ) const
inline

Gets an attribute of this element as a matrix value. This method can be used to get the value of a 'transform' or 'gradientTransform' attribute.

◆ GetAttributeValue() [6/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_SVG_DISPLAY * value ) const
inline

Gets an attribute of this element as a display value. This method can be used to get the value of the 'display' property.

◆ GetAttributeValue() [7/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_SVG_LENGTH * value ) const
inline

Gets an attribute of this element as length value.

◆ GetAttributeValue() [8/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_SVG_LINE_CAP * value ) const
inline

Gets an attribute of this element as a line cap value. This method can be used to get the value of the 'stroke-linecap' property.

◆ GetAttributeValue() [9/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_SVG_LINE_JOIN * value ) const
inline

Gets an attribute of this element as a line join value. This method can be used to get the value of the 'stroke-linejoin' property.

◆ GetAttributeValue() [10/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_SVG_OVERFLOW * value ) const
inline

Gets an attribute of this element as an overflow value. This method can be used to get the value of the 'overflow' property.

◆ GetAttributeValue() [11/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_SVG_PRESERVE_ASPECT_RATIO * value ) const
inline

Gets an attribute of this element as a preserve aspect ratio value. This method can be used to get the value of a 'preserveAspectRatio' attribute.

◆ GetAttributeValue() [12/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_SVG_UNIT_TYPE * value ) const
inline

Gets an attribute of this element as a unit type value. This method can be used to get the value of a 'gradientUnits' or 'clipPathUnits' attribute.

◆ GetAttributeValue() [13/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ D2D1_SVG_VISIBILITY * value ) const
inline

Gets an attribute of this element as a visibility value. This method can be used to get the value of the 'visibility' property.

◆ GetAttributeValue() [14/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
_Out_ FLOAT * value ) const
inline

Gets an attribute of this element as a float.

◆ GetAttributeValue() [15/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_ATTRIBUTE_POD_TYPE type,
void * value,
UINT32 valueSizeInBytes ) const
inline

Gets an attribute of this element as a POD type. Returns an error if the attribute is not specified. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified POD type.

◆ GetAttributeValue() [16/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_ATTRIBUTE_STRING_TYPE type,
PWSTR value,
UINT32 valueCount ) const
inline

Gets an attribute of this element as a string. Returns an error if the attribute is not specified. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified string type.

◆ GetAttributeValue() [17/22]

WideString Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_ATTRIBUTE_STRING_TYPE type = D2D1_SVG_ATTRIBUTE_STRING_TYPE_SVG ) const
inline

◆ GetAttributeValue() [18/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
ID2D1SvgAttribute ** value ) const
inline

Gets an attribute of this element.

◆ GetAttributeValue() [19/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
ID2D1SvgPaint ** value ) const
inline

Gets an attribute of this element as a paint. This method can be used to get the value of the 'fill' or 'stroke' properties.

◆ GetAttributeValue() [20/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
ID2D1SvgPathData ** value ) const
inline

Gets an attribute of this element as path data. This method can be used to get the value of the 'd' attribute on a 'path' element.

◆ GetAttributeValue() [21/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
ID2D1SvgPointCollection ** value ) const
inline

Gets an attribute of this element as points. This method can be used to get the value of the 'points' attribute on a 'polygon' or 'polyline' element.

◆ GetAttributeValue() [22/22]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValue ( _In_ PCWSTR name,
ID2D1SvgStrokeDashArray ** value ) const
inline

Gets an attribute of this element as a stroke dash array. This method can be used to get the value of the 'stroke-dasharray' property.

◆ GetAttributeValueLength() [1/2]

UINT32 Harlinn::Windows::Graphics::SvgElement::GetAttributeValueLength ( _In_ PCWSTR name,
D2D1_SVG_ATTRIBUTE_STRING_TYPE type ) const
inline

◆ GetAttributeValueLength() [2/2]

void Harlinn::Windows::Graphics::SvgElement::GetAttributeValueLength ( _In_ PCWSTR name,
D2D1_SVG_ATTRIBUTE_STRING_TYPE type,
_Out_ UINT32 * valueLength ) const
inline

Gets the string length of an attribute of this element. The returned string length does not include room for the null terminator. Returns an error if the attribute is not specified. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified string type.

◆ GetDocument() [1/2]

SvgDocument Harlinn::Windows::Graphics::SvgElement::GetDocument ( ) const
inline

◆ GetDocument() [2/2]

void Harlinn::Windows::Graphics::SvgElement::GetDocument ( ID2D1SvgDocument ** document) const
inline

Gets the document that contains this element. Returns null if the element has been removed from the tree.

◆ GetFirstChild() [1/2]

SvgElement Harlinn::Windows::Graphics::SvgElement::GetFirstChild ( ) const
inline

◆ GetFirstChild() [2/2]

void Harlinn::Windows::Graphics::SvgElement::GetFirstChild ( ID2D1SvgElement ** child) const
inline

Gets the first child of this element.

◆ GetLastChild() [1/2]

SvgElement Harlinn::Windows::Graphics::SvgElement::GetLastChild ( ) const
inline

◆ GetLastChild() [2/2]

void Harlinn::Windows::Graphics::SvgElement::GetLastChild ( ID2D1SvgElement ** child) const
inline

Gets the last child of this element.

◆ GetNextChild() [1/4]

SvgElement Harlinn::Windows::Graphics::SvgElement::GetNextChild ( _In_ ID2D1SvgElement * referenceChild) const
inline

◆ GetNextChild() [2/4]

void Harlinn::Windows::Graphics::SvgElement::GetNextChild ( _In_ ID2D1SvgElement * referenceChild,
ID2D1SvgElement ** nextChild ) const
inline

Gets the next sibling of the referenceChild element.

Parameters
referenceChildThe referenceChild must be an immediate child of this element.
nextChildThe output nextChild element will be non-null if the referenceChild has a next sibling. If the referenceChild is the last child, the output is null.

◆ GetNextChild() [3/4]

SvgElement Harlinn::Windows::Graphics::SvgElement::GetNextChild ( const SvgElement & referenceChild) const
inline

◆ GetNextChild() [4/4]

void Harlinn::Windows::Graphics::SvgElement::GetNextChild ( const SvgElement & referenceChild,
ID2D1SvgElement ** nextChild ) const
inline

◆ GetParent() [1/2]

SvgElement Harlinn::Windows::Graphics::SvgElement::GetParent ( ) const
inline

◆ GetParent() [2/2]

void Harlinn::Windows::Graphics::SvgElement::GetParent ( ID2D1SvgElement ** parent) const
inline

Gets the parent element.

◆ GetPreviousChild() [1/4]

SvgElement Harlinn::Windows::Graphics::SvgElement::GetPreviousChild ( _In_ ID2D1SvgElement * referenceChild) const
inline

◆ GetPreviousChild() [2/4]

void Harlinn::Windows::Graphics::SvgElement::GetPreviousChild ( _In_ ID2D1SvgElement * referenceChild,
ID2D1SvgElement ** previousChild ) const
inline

Gets the previous sibling of the referenceChild element.

Parameters
referenceChildThe referenceChild must be an immediate child of this element.
previousChildThe output previousChild element will be non-null if the referenceChild has a previous sibling. If the referenceChild is the first child, the output is null.

◆ GetPreviousChild() [3/4]

SvgElement Harlinn::Windows::Graphics::SvgElement::GetPreviousChild ( const SvgElement & referenceChild) const
inline

◆ GetPreviousChild() [4/4]

void Harlinn::Windows::Graphics::SvgElement::GetPreviousChild ( const SvgElement & referenceChild,
ID2D1SvgElement ** previousChild ) const
inline

◆ GetSpecifiedAttributeCount()

UINT32 Harlinn::Windows::Graphics::SvgElement::GetSpecifiedAttributeCount ( ) const
inline

Returns the number of specified attributes on this element. Attributes are only considered specified if they are explicitly set on the element or present within an inline style. Properties that receive their value through CSS inheritance are not considered specified. An attribute can become specified if it is set through a method call. It can become unspecified if it is removed via RemoveAttribute.

◆ GetSpecifiedAttributeName() [1/2]

WideString Harlinn::Windows::Graphics::SvgElement::GetSpecifiedAttributeName ( UINT32 index,
_Out_opt_ BOOL * inherited = nullptr ) const
inline

◆ GetSpecifiedAttributeName() [2/2]

void Harlinn::Windows::Graphics::SvgElement::GetSpecifiedAttributeName ( UINT32 index,
PWSTR name,
UINT32 nameCount,
_Out_opt_ BOOL * inherited = nullptr ) const
inline

Gets the name of the specified attribute at the given index.

Parameters
indexThe specified index of the attribute.
nameOutputs the name of the attribute.
inheritedOutputs whether the attribute is set to the 'inherit' value.

◆ GetSpecifiedAttributeNameLength() [1/2]

void Harlinn::Windows::Graphics::SvgElement::GetSpecifiedAttributeNameLength ( UINT32 index,
_Out_ UINT32 * nameLength,
_Out_opt_ BOOL * inherited = nullptr ) const
inline

Gets the string length of the name of the specified attribute at the given index. The output string length does not include room for the null terminator.

Parameters
indexThe specified index of the attribute.
nameLengthOutputs the string length of the name of the specified attribute.
inheritedOutputs whether the attribute is set to the 'inherit' value.

◆ GetSpecifiedAttributeNameLength() [2/2]

UINT32 Harlinn::Windows::Graphics::SvgElement::GetSpecifiedAttributeNameLength ( UINT32 index,
_Out_opt_ BOOL * inherited = nullptr ) const
inline

◆ GetTagName() [1/2]

WideString Harlinn::Windows::Graphics::SvgElement::GetTagName ( ) const
inline

◆ GetTagName() [2/2]

void Harlinn::Windows::Graphics::SvgElement::GetTagName ( PWSTR name,
UINT32 nameCount ) const
inline

Gets the tag name.

◆ GetTagNameLength()

UINT32 Harlinn::Windows::Graphics::SvgElement::GetTagNameLength ( ) const
inline

Gets the string length of the tag name. The returned string length does not include room for the null terminator.

◆ GetTextValue() [1/2]

WideString Harlinn::Windows::Graphics::SvgElement::GetTextValue ( ) const
inline

◆ GetTextValue() [2/2]

void Harlinn::Windows::Graphics::SvgElement::GetTextValue ( PWSTR value,
UINT32 valueCount ) const
inline

Gets the value of a text content element.

◆ GetTextValueLength()

UINT32 Harlinn::Windows::Graphics::SvgElement::GetTextValueLength ( ) const
inline

Gets the length of the text content value. The returned string length does not include room for the null terminator.

◆ HasChildren()

bool Harlinn::Windows::Graphics::SvgElement::HasChildren ( ) const
inline

Returns whether this element has children.

◆ InsertChildBefore() [1/3]

void Harlinn::Windows::Graphics::SvgElement::InsertChildBefore ( _In_ ID2D1SvgElement * newChild,
_In_opt_ ID2D1SvgElement * referenceChild = nullptr ) const
inline

Inserts newChild as a child of this element, before the referenceChild element. If the newChild element already has a parent, it is removed from this parent as part of the insertion. Returns an error if this element cannot accept children of the type of newChild. Returns an error if the newChild is an ancestor of this element.

Parameters
newChildThe element to be inserted.
referenceChildThe element that the child should be inserted before. If referenceChild is null, the newChild is placed as the last child. If referenceChild is non-null, it must be an immediate child of this element.

◆ InsertChildBefore() [2/3]

void Harlinn::Windows::Graphics::SvgElement::InsertChildBefore ( const SvgElement & newChild,
_In_opt_ ID2D1SvgElement * referenceChild = nullptr ) const
inline

◆ InsertChildBefore() [3/3]

void Harlinn::Windows::Graphics::SvgElement::InsertChildBefore ( const SvgElement & newChild,
const SvgElement & referenceChild ) const
inline

◆ IsAttributeSpecified()

bool Harlinn::Windows::Graphics::SvgElement::IsAttributeSpecified ( _In_ PCWSTR name,
BOOL * inherited = NULL ) const
inline

Returns true if the attribute is explicitly set on the element or if it is present within an inline style. Returns FALSE if the attribute is not a valid attribute on this element.

Parameters
nameThe name of the attribute.
inheritedOutputs whether the attribute is set to the 'inherit' value.

◆ IsTextContent()

bool Harlinn::Windows::Graphics::SvgElement::IsTextContent ( ) const
inline

Returns TRUE if this element represents text content, e.g. the content of a 'title' or 'desc' element. Text content does not have a tag name.

◆ RemoveAttribute()

void Harlinn::Windows::Graphics::SvgElement::RemoveAttribute ( _In_ PCWSTR name) const
inline

Removes the attribute from this element. Also removes this attribute from within an inline style if present. Returns an error if the attribute name is not valid on this element.

◆ RemoveChild() [1/2]

void Harlinn::Windows::Graphics::SvgElement::RemoveChild ( _In_ ID2D1SvgElement * oldChild) const
inline

Removes the oldChild from the tree. Children of oldChild remain children of oldChild.

Parameters
oldChildThe child element to be removed. The oldChild element must be an immediate child of this element.

◆ RemoveChild() [2/2]

void Harlinn::Windows::Graphics::SvgElement::RemoveChild ( const SvgElement & oldChild) const
inline

◆ ReplaceChild() [1/4]

void Harlinn::Windows::Graphics::SvgElement::ReplaceChild ( _In_ ID2D1SvgElement * newChild,
_In_ ID2D1SvgElement * oldChild ) const
inline

Replaces the oldChild element with the newChild. This operation removes the oldChild from the tree. If the newChild element already has a parent, it is removed from this parent as part of the replace operation. Returns an error if this element cannot accept children of the type of newChild. Returns an error if the newChild is an ancestor of this element.

Parameters
newChildThe element to be inserted.
oldChildThe child element to be replaced. The oldChild element must be an immediate child of this element.

◆ ReplaceChild() [2/4]

void Harlinn::Windows::Graphics::SvgElement::ReplaceChild ( _In_ ID2D1SvgElement * newChild,
const SvgElement & oldChild ) const
inline

◆ ReplaceChild() [3/4]

void Harlinn::Windows::Graphics::SvgElement::ReplaceChild ( const SvgElement & newChild,
_In_ ID2D1SvgElement * oldChild ) const
inline

◆ ReplaceChild() [4/4]

void Harlinn::Windows::Graphics::SvgElement::ReplaceChild ( const SvgElement & newChild,
const SvgElement & oldChild ) const
inline

◆ SetAttributeValue() [1/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
_In_ ID2D1SvgAttribute * value ) const
inline

Sets an attribute of this element using an interface. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified interface type. Returns an error if the attribute object is already set on an element. A given attribute object may only be set on one element in one attribute location at a time.

◆ SetAttributeValue() [2/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
CONST D2D1_COLOR_F & value ) const
inline

Sets an attribute of this element as a color.

◆ SetAttributeValue() [3/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
const D2D1_MATRIX_3X2_F & value )
inline

Sets an attribute of this element as a matrix value. This method can be used to set the value of a 'transform' or 'gradientTransform' attribute.

◆ SetAttributeValue() [4/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
const D2D1_SVG_LENGTH & value ) const
inline

Sets an attribute of this element as a length value.

◆ SetAttributeValue() [5/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
CONST D2D1_SVG_PRESERVE_ASPECT_RATIO & value ) const
inline

Sets an attribute of this element as a preserve aspect ratio value. This method can be used to set the value of a 'preserveAspectRatio' attribute.

◆ SetAttributeValue() [6/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
D2D1_EXTEND_MODE value ) const
inline

Sets an attribute of this element as an extend mode value. This method can be used to set the value of a 'spreadMethod' attribute.

◆ SetAttributeValue() [7/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
D2D1_FILL_MODE value ) const
inline

Sets an attribute of this element as a fill mode. This method can be used to set the value of the 'fill-rule' or 'clip-rule' properties.

◆ SetAttributeValue() [8/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_ATTRIBUTE_POD_TYPE type,
const void * value,
UINT32 valueSizeInBytes ) const
inline

Sets an attribute of this element using a POD type. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified type.

◆ SetAttributeValue() [9/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_ATTRIBUTE_STRING_TYPE type,
_In_ PCWSTR value ) const
inline

Sets an attribute of this element using a string. Returns an error if the attribute name is not valid on this element. Returns an error if the attribute cannot be expressed as the specified type.

◆ SetAttributeValue() [10/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_DISPLAY value ) const
inline

Sets an attribute of this element as a display value. This method can be used to set the value of the 'display' property.

◆ SetAttributeValue() [11/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_LINE_CAP value ) const
inline

Sets an attribute of this element as a line cap value. This method can be used to set the value of the 'stroke-linecap' property.

◆ SetAttributeValue() [12/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_LINE_JOIN value ) const
inline

Sets an attribute of this element as a line join value. This method can be used to set the value of the 'stroke-linejoin' property.

◆ SetAttributeValue() [13/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_OVERFLOW value ) const
inline

Sets an attribute of this element as an overflow value. This method can be used to set the value of the 'overflow' property.

◆ SetAttributeValue() [14/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_UNIT_TYPE value ) const
inline

Sets an attribute of this element as a unit type value. This method can be used to set the value of a 'gradientUnits' or 'clipPathUnits' attribute.

◆ SetAttributeValue() [15/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
D2D1_SVG_VISIBILITY value ) const
inline

Sets an attribute of this element as a visibility value. This method can be used to set the value of the 'visibility' property.

◆ SetAttributeValue() [16/16]

void Harlinn::Windows::Graphics::SvgElement::SetAttributeValue ( _In_ PCWSTR name,
FLOAT value ) const
inline

Sets an attribute of this element using a float.

◆ SetTextValue() [1/3]

void Harlinn::Windows::Graphics::SvgElement::SetTextValue ( const std::wstring_view & value) const
inline

◆ SetTextValue() [2/3]

void Harlinn::Windows::Graphics::SvgElement::SetTextValue ( const WCHAR * value,
UINT32 valueCount ) const
inline

Sets the value of a text content element.

◆ SetTextValue() [3/3]

void Harlinn::Windows::Graphics::SvgElement::SetTextValue ( const WideString & value) const
inline

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