kPDEMoveTo | Designates the m (
moveto ) operator, which moves the current point. |
kPDELineTo | Designates the l (
lineto ) operator, which appends a straight line segment from the current point. |
kPDECurveTo | Designates the c (
curveto ) operator, which appends a bezier curve to the path. |
kPDECurveToV | Designates the v (
curveto ) operator, which appends a bezier curve to the current path when the first control point coincides with initial point on the curve. |
kPDECurveToY | Designates the y (
curveto ) operator, which appends a bezier curve to the current path when the second control point coincides with final point on the curve. |
kPDERect | Designates the re operator, which adds a rectangle to the current path.
|
kPDEClosePath | Designates the h (
closepath ) operator, which closes the current sub-path. |
kPDEPathLastType |
kPDEInvisible = 0x00 | The path is neither stroked nor filled, so it is invisible.
|
kPDEStroke = 0x01 | Stroke the path, as with the S (
stroke ) operator. |
kPDEFill = 0x02 | Fills the path, using the nonzero winding number rule to determine the region to fill, as with the f (
fill ) operator. |
kPDEEoFill = 0x04 | Fills the path, using the even/odd rule to determine the region to fill, as with the f * (
eofill ) operator. |
typedef
struct
_t_PDEPath
*
PDEPath
;
void
PDEPathAddSegment(
IN
PDEPath
path
,
IN
ASUns32
segType
,
IN
ASFixed
x1
,
IN
ASFixed
y1
,
IN
ASFixed
x2
,
IN
ASFixed
y2
,
IN
ASFixed
x3
,
IN
ASFixed
y3
);
path | IN/OUT The path to which a segment is added.
|
segType | IN/OUT A PDEPathElementType value indicating the type of path to add.
|
x1 | IN/OUT The x-coordinate of the first point.
|
y1 | IN/OUT The y-coordinate of the first point.
|
x2 | IN/OUT The x-coordinate of the second point.
|
y2 | IN/OUT The y-coordinate of the second point.
|
x3 | IN/OUT The x-coordinate of the third point.
|
y3 | IN/OUT The y-coordinate of the third point.
|
Creates an empty path element.
Call PDERelease() to dispose of the returned path object when finished with it.
PDEPath
PDEPathCreate(
void
);
ASUns32
PDEPathGetData(
IN
PDEPath
path
,
OUT
ASInt32
*
data
,
IN
ASUns32
dataSize
);
path | IN/OUT The path whose data is obtained.
|
data | IN/OUT (Filled by the method) A pointer to the path data. If
data is non- NULL , it contains a variable-sized array of path operators and operands. The format is a 32-bit operator followed by 0 to 3 ASFixedPoint values, depending on the operator. Opcodes are codes for moveto , lineto , curveto , rect , or closepath operators; operands are ASFixedPoint values. If data is NULL , the number of bytes required for data is returned by the method. Note that it returns raw path data. If you want the points in page coordinates, concatenate the path data points with the PDEElement matrix obtained from PDEElementGetMatrix(). |
dataSize | IN/OUT Specifies the size of the buffer provided in data. If it is less than the length of the path data, the method copies
dataSize bytes. If it is zero, the ASFixed value of path->size is returned. |
path
. PDEPathGetData
API. ASUns32
PDEPathGetDataEx(
IN
PDEPath
path
,
OUT
ASReal
*
data
,
IN
ASUns32
dataSize
);
path | IN/OUT The path whose data is obtained.
|
data | IN/OUT (Filled by the method) A pointer to the path data. If
data is non- NULL , it contains a variable-sized array of path operators and operands. The format is a 32-bit operator followed by 0 to 3 ASReal values, depending on the operator. Opcodes are codes for moveto , lineto , curveto , rect , or closepath operators; operands are ASReal values. If data is NULL , the number of bytes required for data is returned by the method. Note that it returns raw path data. If you want the points in page coordinates, concatenate the path data points with the PDEElement matrix obtained from PDEElementGetMatrix(). |
dataSize | IN/OUT Specifies the size of the buffer provided in data. If it is less than the length of the path data, the method copies
dataSize bytes. |
path
. ASUns32
PDEPathGetPaintOp(
IN
PDEPath
path
);
path | The path whose fill and stroke attributes are obtained.
|
void
PDEPathSetData(
IN
PDEPath
path
,
IN
ASInt32
*
data
,
IN
ASUns32
dataSize
);
path | IN/OUT The path whose data is set.
|
data | IN/OUT A pointer to the path data. It is a variable-sized array of path operators and operands. The format is a 32-bit operator followed by zero to three ASFixedPoint values, depending on the operator. Operators are codes for
moveto , lineto , curveto , rect , or closepath operators, and must be one of PDEPathElementType. Operands are ASFixedPoint values. The data is copied into the PDEPath object. |
dataSize | IN/OUT The size of the new path data in bytes.
|
PDEPathSetData
API. void
PDEPathSetDataEx(
IN
PDEPath
path
,
IN
ASReal
*
data
,
IN
ASUns32
dataSize
);
path | IN/OUT The path whose data is set.
|
data | IN/OUT A pointer to the path data. It is a variable-sized array of path operators and operands. The format is a 32-bit operator followed by zero to three ASReal values, depending on the operator. Operators are codes for
moveto , lineto , curveto , rect , or closepath operators, and must be one of PDEPathElementType. Operands are ASReal values. The data is copied into the PDEPath object. |
dataSize | IN/OUT The size of the new path data in bytes.
|
void
PDEPathSetPaintOp(
IN
PDEPath
path
,
IN
ASUns32
op
);
path | IN/OUT The path whose fill and stroke attributes are set.
|
op | IN/OUT The operation to set; it must be one of PDEPathOpFlags.
|