Class ColorAttr
Represents an attribute for color values.
Inherited Members
Namespace: OpenSvg.Attributes
Assembly: OpenSvg.dll
Syntax
public class ColorAttr : Attr<SKColor>, IAttr, IEquatable<IAttr>, IEquatable<Attr<SKColor>>
Constructors
| Edit this page View SourceColorAttr(string, SKColor, bool)
Initializes a new instance of the ColorAttr class.
Declaration
public ColorAttr(string name, SKColor defaultValue, bool isConstant = false)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the attribute. |
SKColor | defaultValue | The default value of the attribute. |
bool | isConstant | Whether the attribute is a constant that cannot be changed. |
Methods
| Edit this page View SourceDeserialize(string)
Deserializes an XML string to the value of the attribute.
Declaration
protected override SKColor Deserialize(string xmlString)
Parameters
Type | Name | Description |
---|---|---|
string | xmlString | The XML string to deserialize. |
Returns
Type | Description |
---|---|
SKColor | The deserialized value. |
Overrides
| Edit this page View SourceSerialize(SKColor)
Serializes the value of the attribute to an XML string.
Declaration
protected override string Serialize(SKColor value)
Parameters
Type | Name | Description |
---|---|---|
SKColor | value | The value to serialize. |
Returns
Type | Description |
---|---|
string | The XML string representation of the value. |