Back to top OpenSVG (c) Veridict AB, www.veridict.com
Edit this page

Class ColorAttr

Represents an attribute for color values.

Inheritance
object
Attr<SKColor>
ColorAttr
Implements
IAttr
IEquatable<IAttr>
IEquatable<Attr<SKColor>>
Inherited Members
Attr<SKColor>.DefaultValue
Attr<SKColor>.Name
Attr<SKColor>.IsConstant
Attr<SKColor>.ShouldBeSerialized
Attr<SKColor>.SetBySerializer(string)
Attr<SKColor>.ToXmlString()
Attr<SKColor>.DefaultEquals(SKColor)
Attr<SKColor>.ValueEquals(SKColor)
Attr<SKColor>.Equals(Attr<SKColor>)
Attr<SKColor>.Set(SKColor)
Attr<SKColor>.Get()
Attr<SKColor>.ToString()
Attr<SKColor>.Equals(IAttr)
Attr<SKColor>.GetHashCode()
Attr<SKColor>.Equals(object)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: OpenSvg.Attributes
Assembly: OpenSvg.dll
Syntax
public class ColorAttr : Attr<SKColor>, IAttr, IEquatable<IAttr>, IEquatable<Attr<SKColor>>

Constructors

| Edit this page View Source

ColorAttr(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 Source

Deserialize(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
Attr<SKColor>.Deserialize(string)
| Edit this page View Source

Serialize(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.

Overrides
Attr<SKColor>.Serialize(SKColor)

Implements

IAttr
IEquatable<T>
IEquatable<T>