Specifies the current path by a sequence of characters.
Data is a string composed of characters that indicate the type and the coordinates of the points of the primitive shapes for the current path. Set Data to define and populate path with primitive shapes.
When setting it, the Data value has the following structure:
'character' 'points or values'[ 'next shape'].
• 'character' specifies the type of the shape.
• 'points or values' indicates the points coordinates or the values that define the shape.
A moved point or a line is specified by a point, and a curve is specified by three points. If the line is vertical or horizontal, it is necessary to specify only the y- or x-coordinate of the end of the line, respectively.
The coordinates of a point are separated by ',' (comma) or ' '(space character). Two consecutive shapes are separated by ',' or ' '. If the shape is defined by more than one point and value, they are separated by ',' or ' '.
'character' can have the following values:
'z'
Defines a closed path.
'Z'
Defines a closed path.
'M'
Defines a point moved by calling MoveTo. If more than one point can be found after 'M', lines are added to connect the points in the order they appear in the string.
'm'
Defines a point moved by calling MoveToRel. If more than one point can be found after 'M', lines are added to connect the points in the order they appear in the string.
'L'
Defines a sequence of one or more lines, added by calling
LineTo. The added lines connect the points in the order they appear in the string.
'l'
Defines a sequence of one or more lines, added by calling
LineToRel. The added lines connect the points in the order they appear in the string.
'C'
Defines a sequence of one or more curves, added by calling CurveTo. The added curves connect the points in the order they appear in the string.
'c'
Defines a sequence of one or more curves, added by calling CurveToRel. The added curves connect the points in the order they appear in the string.
'S'
Defines a sequence of one or more smooth curves, added by calling
SmoothCurveTo. The added curves connect the points in the order they appear in the string.
's'
Defines a sequence of one or more smooth curves, added by calling
SmoothCurveToRel. The added curves connect the points in the order they appear in the string.
'H'
Defines a line, added by calling HLineTo
'h'
Defines a line, added by calling HLineToRel
'V'
Defines a line, added by calling VLineTo
'v'
Defines a line, added by calling VLineToRel
'A'
Defines an arc. An arc is defined by the center point, the rays of the parent ellipse, the angle of the arc, two flags, and the end point.
'a'
Defines an arc. The arc coordinates are calculated related to the last point of the path. An arc is defined by the center point, the rays of the parent ellipse, the angle of the arc, two flags, and the end point.
Namespace: RSGdiPlusGraphics
Delphi |
published |
Property Value
Type: String
Unlike the FMX TPathData class, Data is not an exact representation of the path because of the "special" kinds: ppPathTypeMask, ppDashMode, ppPathMarker. |
The following example sets the path from a string:
|