Extends the FMX.RS.SVGTypes.TSVGLength class for style properties which may be inherited. The current length is stored in the current class. However, the Value property will change depending on if the length is inherited and its parent (returned via the FMX.RS.SVGTypes.TSVGStylePropertyLength.OnGetParent event). The FMX.RS.SVGTypes.TSVGStylePropertyLength.ParentValue property determines if the length should be inherited or not. If the length is inherited, the Value property uses the GetParent method (which calls the OnGetParent event) to return the inherited value.
The FMX.RS.SVGTypes.TSVGStylePropertyLength.StyleProperty property returns which style property this length is representing.
The FMX.RS.SVGTypes.TSVGStylePropertyLength.OnGetInherited and FMX.RS.SVGTypes.TSVGStylePropertyLength.OnSetInherited events allow the length class to communicate when the ParentValue property is changed.
Namespace: FMX.RS.SVGTypes
Delphi
|
type
TSVGStylePropertyLength = class(TSVGLength)
end;
|
|
Name
|
Description
|
|
AsUnit[TSVGUnit]
|
Reads and writes the current length using the specified unit. Setting this property will convert the length to the new unit and the Raw value will be changed. (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
aUnit
|
Specifies the units (e.g., inches, centimeters, etc) that the length is currently specified in. (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
DefaultIsPercent
|
Defines the default FMX.RS.SVGTypes.TSVGLength.IsPercent value, used to determine if the IsPercent value should be streamed (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
IsPercent
|
Specifies whether the FMX.RS.SVGTypes.TSVGLength.Raw value should be interpreted as a percentage or not (with 0 being 0% and 1 equal to 100%) (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
OnChange
|
Occurs when the length is changed, either the value or the units (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
ParentValue
|
Controls whether the Value property should return the parent's length value (i.e., the length is inherited) or its own value
|
|
Pixels
|
Returns the length in pixels by converting the FMX.RS.SVGTypes.TSVGLength.Raw value from its units to pixels, using the FMX.RS.SVGTypes.TSVGLength.GetUnitFactors for conversion of the raw value. If the raw value is a percentage, the property returns the raw value as a value between 0 and 1. Use the FMX.RS.SVGTypes.TSVGLength.Value property to convert the percentage into a value in its range. (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
Raw
|
Defines the raw value in the current unit. The length class uses this value as the base value of the length. When you request the raw value in Pixels, the class converts the raw value to number of pixels using the Unit Factors. (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
StyleProperty
|
Returns the FMX.RS.SVGTypes.TSVGStyleProperty that this length is used for.
|
|
Value
|
Specifies the length value in pixels (based on converting from the Unit). If the length is a percentage, the Pixels value is converted to a final value using the range of the length (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
Top
|
|
Name
|
Description
|
|
Assign(TPersistent)
|
Represents method Assign(TPersistent). (Overrides FMX.RS.SVGTypes.TSVGLength.Assign(TPersistent).)
|
|
Change
|
Represents method Change. (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
Clear
|
Clears the length to 0 and no units (Overrides FMX.RS.SVGTypes.TSVGLength.Clear.)
|
|
Clone
|
Creates a copy of the length (Overrides FMX.RS.SVGTypes.TSVGLength.Clone.)
|
|
GetParentValue
|
Returns the length representing the inherited value
Calls the OnGetParent event. If the value is not inherited, this method returns nil
|
|
GetPercentValue(Single,Single)
|
Returns the Raw value. If the length is a percentage, it converts the raw value into a value between Min and Max parameters (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
GetUnitFactors
|
Returns the unit factors array for converting FMX.RS.SVGTypes.TSVGLength.Raw values into FMX.RS.SVGTypes.TSVGLength.Pixels. This method calls the FMX.RS.SVGTypes.TSVGLength.OnUnitFactors event if assigned or returns the FMX.RS.SVGTypes.SVGUnitFactors constant if it is not. (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
GetValue
|
Represents method GetValue. (Overrides FMX.RS.SVGTypes.TSVGLength.GetValue.)
|
|
Initialize(Single,Boolean,TSVGUnit)
|
Initializes the length to the specified FMX.RS.SVGTypes.TSVGLength.Raw value, Unit, and if it is a percentage (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
|
SetValue(Single)
|
Represents method SetValue(Single). (Overrides FMX.RS.SVGTypes.TSVGLength.SetValue(Single).)
|
|
ToString(String,Single,Single)
|
Overloaded. Returns a string representation of the length. If the length is a percentage, the method uses the Min and Max values to convert the Raw value into its final value (Inherited from FMX.RS.SVGTypes.TSVGLength.)
|
Top
|