Method TryGetAttributeValue
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
TryGetAttributeValue(string, SvgAttributeStringType, out string?)
Gets an attribute of this element as a string.
bool TryGetAttributeValue(string name, SvgAttributeStringType type, out string? value)
Parameters
namestringThe name of the attribute.
typeSvgAttributeStringTypeThe string type.
valuestringThe attribute value.
Returns
- bool
The value of the attribute.
Remarks
Returns false if the attribute name is not valid on this element.
Returns false if the attribute cannot be expressed as the specified string type.
Returns false if the attribute is not specified.
TryGetAttributeValue(string, SvgAttributePodType, Span<byte>)
Gets an attribute of this element as a POD (plain old data) type.
bool TryGetAttributeValue(string name, SvgAttributePodType type, Span<byte> value)
Parameters
namestringThe name of the attribute.
typeSvgAttributePodTypeThe POD type of the value.
valueSpan<byte>The buffer to receive the value.
Returns
Remarks
Returns false if the attribute is not specified.
Returns false if the attribute name is not valid on this element.
Returns false if the attribute cannot be expressed as the specified POD type.