23 : base(AttributeName, Value, Document)
34 : base(E, AttributeName, true, Document)
57 if (Result is
double d)
138 return base.TryConvert(Result, out Value);
141 private static readonly
Unit pixels =
new Unit(
"px");
273 while (i >= 0 && ((ch =
StringValue[i]) <=
' ' || ch == 160))
286 private static Exception InvalidLengthException(
string AttributeValue)
Helps with parsing of commong data types.
static string Encode(bool x)
Encodes a Boolean for use in XML and other formats.
static bool TryParse(string s, out double Value)
Tries to decode a string encoded double.
Syntax-related layout exception
Contains a 2D layout document.
Manages an attribute value or expression.
bool HasPresetValue
If the attribute has a preset value.
string Name
Attribute name
LengthAttribute(XmlElement E, string AttributeName, Layout2DDocument Document)
Length attribute
LengthAttribute(string AttributeName, Length Value, Layout2DDocument Document)
Length attribute
override bool TryParse(string StringValue, out Length Value)
Tries to parse a string value
LengthAttribute(string AttributeName, Expression Expression, Layout2DDocument Document)
Length attribute
LengthAttribute CopyIfNotPreset(Layout2DDocument ForDocument)
Copies the attribute object if undefined, or defined by an expression. Returns a reference to itself,...
override string ToString(Length Value)
Converts a value to a string.
override bool TryConvert(object Result, out Length Value)
Tries to convert script result to a value of type float.
LengthUnit Unit
Unit of length.
float Value
Value of length
Class managing a script expression.
PhysicalQuantity ToPhysicalQuantity()
Converts underlying object to a physical quantity.
double Magnitude
Magnitude
static bool TryConvert(double From, Unit FromUnit, Unit ToUnit, out double To)
Tries to convert a magnitude in one unit to a magnitude in another.
override string ToString()
Interface for objects that can be represented as a physical quantity.