Class FloatAttr
Represents an attribute for floating-point values.
Inherited Members
Namespace: OpenSvg.Attributes
Assembly: OpenSvg.dll
Syntax
public class FloatAttr : Attr<float>, IAttr, IEquatable<IAttr>, IEquatable<Attr<float>>
Constructors
| Edit this page View SourceFloatAttr(string)
Initializes a new instance of the FloatAttr class.
Declaration
public FloatAttr(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the attribute. |
FloatAttr(string, float)
Initializes a new instance of the FloatAttr class.
Declaration
public FloatAttr(string name, float defaultValue)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the attribute. |
float | defaultValue | The default value of the attribute. |
Methods
| Edit this page View SourceDeserialize(string)
Deserializes an XML string to the value of the attribute.
Declaration
protected override float Deserialize(string xmlString)
Parameters
Type | Name | Description |
---|---|---|
string | xmlString | The XML string to deserialize. |
Returns
Type | Description |
---|---|
float | The deserialized value. |
Overrides
| Edit this page View SourceSerialize(float)
Serializes the value of the attribute to an XML string.
Declaration
protected override string Serialize(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | The value to serialize. |
Returns
Type | Description |
---|---|
string | The XML string representation of the value. |