DL Logo

PDEPath Enumerations

PDEPathElementType

Header: PEExpT.h:1782

Description

An enumerated data type for path segment operators in PDEPath elements.

Enum Constants

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

PDEPathOpFlags

Header: PEExpT.h:1839

Description

Flags for paint operators in a PDEPath.

Enum Constants

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.

PDEPath Typedefs

PDEPath

Header: PEExpT.h:174

Description

A PDEElement that contains a path. Path objects can be stroked, filled, and/or serve as clipping paths.

Related Methods

Syntax

typedef struct _t_PDEPath *PDEPath;

Returned From

Used By

PDEPath Structures

_t_PDEPathData

Header: PEExpT.h:1825

Syntax

struct _t_PDEPathData {
ASInt32 elemType;
ASFloat OneH;
ASFloat OneV;
ASFloat TwoH;
ASFloat TwoV;
ASFloat ThreeH;
ASFloat ThreeV;
} PDEPathData;

PDEPath Functions

PDEPathAddSegment

Header: PEWProcs.h:1380

Description

Adds a segment to a path. The number of ASFixed values used depends upon segType:
segType
ASFixed values
  • x1
  • y1
  • x1
  • y1
  • x1
  • y1
  • x2
  • y2
  • y3
  • x1
  • y1
  • x2
  • y2
  • x1
  • y1
  • x2
  • y2
  • x1
  • y1
  • x2 (width)
  • y2 (height)
  • None

    Related Methods

    Syntax

    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);

    Parameters

    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.

    Exceptions

    PDEPathCreate

    Header: PEWProcs.h:485

    Description

    Creates an empty path element.

    Call PDERelease() to dispose of the returned path object when finished with it.

    Syntax

    PDEPath PDEPathCreate(void);

    Returns

    An empty path element.

    PDEPathGetData

    Header: PERProcs.h:723

    Description

    Gets the size of the path data and, optionally, the path data.

    Syntax

    ASUns32 PDEPathGetData(IN PDEPath path, OUT ASInt32 *data, IN ASUns32 dataSize);

    Parameters

    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.

    Returns

    The length of the data of path.

    Exceptions

    PDEPathGetDataEx

    Header: PERProcs.h:3215

    Description

    Gets the size of the path data and, optionally, the path data. This API is an extension to the PDEPathGetData API.

    Syntax

    ASUns32 PDEPathGetDataEx(IN PDEPath path, OUT ASReal *data, IN ASUns32 dataSize);

    Parameters

    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.

    Returns

    The length of the data of path.

    Exceptions

    PDEPathGetPaintOp

    Header: PERProcs.h:735

    Description

    Gets the fill and stroke attributes of a path.

    Related Methods

    Syntax

    ASUns32 PDEPathGetPaintOp(IN PDEPath path);

    Parameters

    path
    The path whose fill and stroke attributes are obtained.

    Returns

    A set of PDEPathOpFlags flags describing fill and stroke attributes.

    Exceptions

    PDEPathSetData

    Header: PEWProcs.h:461

    Description

    Sets new path data for a path element.

    Syntax

    void PDEPathSetData(IN PDEPath path, IN ASInt32 *data, IN ASUns32 dataSize);

    Parameters

    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.

    Exceptions

    PDEPathSetDataEx

    Header: PEWProcs.h:3736

    Description

    Sets new path data for a path element. This API is an extension to the PDEPathSetData API.

    Syntax

    void PDEPathSetDataEx(IN PDEPath path, IN ASReal *data, IN ASUns32 dataSize);

    Parameters

    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.

    Exceptions

    PDEPathSetPaintOp

    Header: PEWProcs.h:474

    Description

    Sets the fill and stroke attributes of a path.

    Related Methods

    Syntax

    void PDEPathSetPaintOp(IN PDEPath path, IN ASUns32 op);

    Parameters

    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.

    Exceptions