FMX.Objects.TPath.Data
Delphi
property Data: TPathData read FData write SetPathData;
C++
__property Data;
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | FMX.Objects.pas FMX.Objects.hpp |
FMX.Objects | TPath |
Description
Specifies the SVG data used to build graphic shapes.
FMX.Objects.TPath.Data inherits from FMX.Objects.TCustomPath.Data. All content below this line refers to FMX.Objects.TCustomPath.Data.
Specifies the SVG data used to build graphic shapes.
The Data property supports only a comma-separated list of instructions defined for the d attribute of the path element in SVG 1.0.
In SVG 1.0, the d attribute contains the moveto, line, curve, arc, and closepath instructions. All instructions are expressed as one character (for example, a moveto is expressed as an M).
For more information, see Scalable Vector Graphics (SVG) 1.0 Specification.
Example
To clarify, consider the following code snippets that specify the SVG instructions at run time:
Delphi:
Path1.Data.Data := 'M 1,0, L 2,1, L 1,2, L 0,1, L 1,0';
C++Builder:
Path1->Data->Data = "M 1,0, L 2,1, L 1,2, L 0,1, L 1,0";
An application that uses the above mentioned SVG instructions displays a rhomb: