Method SetAttributeValue
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
SetAttributeValue(string, SvgAttributeStringType, string)
Sets an attribute of this element using a string.
void SetAttributeValue(string name, SvgAttributeStringType type, string value)
Parameters
namestringName of the attribute to set.
typeSvgAttributeStringTypeThe type of the string.
valuestringThe new value of the attribute.
Remarks
Throws an exception if the attribute name is not valid on this element.
Throws an exception if the attribute cannot be expressed as the specified type.
SetAttributeValue(string, SvgAttributePodType, ReadOnlySpan<byte>)
Sets an attribute of this element using a POD (plain old date) type.
void SetAttributeValue(string name, SvgAttributePodType type, ReadOnlySpan<byte> value)
Parameters
namestringName of the attribute to set.
typeSvgAttributePodTypeThe POD type of the attribute.
valueReadOnlySpan<byte>A buffer with the new value of the attribute.
Remarks
Throws an exception if the attribute name is not valid on this element.
Throws an exception if the attribute cannot be expressed as the specified type.
SetAttributeValue(string, ISvgAttribute)
Sets an attribute of this element using an object reference. A given attribute object may only set on one element in one attribute location at a time.
void SetAttributeValue(string name, ISvgAttribute value)
Parameters
namestringName of the attribute to set.
valueISvgAttributeThe new value of the attribute.
Remarks
Throws an exception if the attribute name is not valid on this element.
Throws an exception if the attribute cannot be expressed as the specified interface type.
Throws an exception if the attribute object is already set on an element.