f = PathItems(id)
See Generic For statement for details.
The table returned by PathItems() will contain a Type field which contains a string
that describes the item type. All further table fields depend on the item type as returned
in Type. The following types are currently supported:
NewSubPath:
ClosePath:
MoveTo:MoveTo table contains the following three additional
arguments:
Rel:True, the coordinates have to be interpreted as
relative to the current point.
X:
Y:
LineTo:LineTo table
contains the following three additional arguments:
Rel:True, the coordinates have to be interpreted as
relative to the current point.
X:
Y:
If there is no current point, LineTo will behave as if it was MoveTo, i.e. it will
simply set the current point to the specified vertex.
CurveTo:CurveTo table contains the following seven additional arguments:
Rel:True, the coordinates have to be interpreted as
relative to the current point.
X1:
Y1:
X2:
Y2:
X3:
Y3:
If there is no current point, CurveTo will use the point passed in (x1,y1) as
the current point.
Arc:Arc will open a new subpath for the new arc
only in case there is no currently active subpath. If there is already a subpath, Arc
will connect its starting vertex with the current vertex of the subpath. Arc will not
close the subpath when it has finished adding its vertices. Arc will not connect the
start and end angles of the arc with its center point automatically. This has to be
requested explicitly by issuing separate MoveTo and LineTo commands before and after
Arc. The Arc table contains the following additional arguments:
XC:YC:RA:RB:Start:End:Clockwise:
When Arc is done, it will set the current point to the position of the
end angle.
Box:Box will first open a new subpath, then add the rectangle's
vertices to it and close the subpath when it is finished. Optionally, the rectangle can have rounded
corners. The Box table contains the following additional arguments:
X:Y:Width:Height:Round:
Text:Text table contains the following
additional arguments:
Size:
Text:
When Text is done, it will set the current point to where the next character would be
displayed.
For t In PathItems(1) Do DebugPrint(t.type)The code above iterates over all items in path 1 and prints the type of each item to the debug device.