LayerPDFEdit_Layer
ObjectPDEPath

A PDEPath is a PDEElement that contains a path. It can have fill and stroke attributes. It also has graphics state attributes. The shape of a PDEPath can be used to represent a clipping path.

The PDEPath methods allow constructing a path from segments and setting its fill and stroke attributes.



Typedef Summary
 Typedef
 PDEPath
A PDEElement that contains a path. Path objects can be stroked, filled, and/or serve as clipping paths.
Enumeration Summary
 Enumeration
  PDEPathElementType
An enumerated data type for path segment operators in PDEPath elements.
  PDEPathOpFlags
Flags for paint operators in a PDEPath.
Method Summary
 Method
 
void PDEPathAddSegment(INPDEPath path, INASUns32 segType, INASFixed x1, INASFixed y1, INASFixed x2, INASFixed y2, INASFixed x3, INASFixed y3)
Adds a segment to a path. The number of ASFixed values used depends upon segType:
 
PDEPath PDEPathCreate()
Creates an empty path element.
 
ASUns32 PDEPathGetData(INPDEPath path, OUTASInt32* data, INASUns32 dataSize)
Gets the size of the path data and, optionally, the path data.
 
ASUns32 PDEPathGetDataEx(INPDEPath path, OUTASReal* data, INASUns32 dataSize)
Gets the size of the path data and, optionally, the path data. This API is an extension to the PDEPathGetData API.
 
ASUns32 PDEPathGetPaintOp(INPDEPath path)
Gets the fill and stroke attributes of a path.
 
void PDEPathSetData(INPDEPath path, INASInt32* data, INASUns32 dataSize)
Sets new path data for a path element.
 
void PDEPathSetDataEx(INPDEPath path, INASReal* data, INASUns32 dataSize)
Sets new path data for a path element. This API is an extension to the PDEPathSetData API.
 
void PDEPathSetPaintOp(INPDEPath path, INASUns32 op)
Sets the fill and stroke attributes of a path.

Typedefs Detail
PDEPath 
Product availability: All
Platform availability: All

Syntax

typedef struct _t_PDEPath* PDEPath;

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

See Also


File: PEExpT.h
Line: 171

Enumeration Detail
PDEPathElementType
Product availability: All
Platform availability: All

Syntax

enum PDEPathElementType {
 kPDEMoveTo,
 
 kPDELineTo,
 
 kPDECurveTo,
 
 kPDECurveToV,
 
 kPDECurveToY,
 
 kPDERect,
 
 kPDEClosePath,
 
 kPDEPathLastType
}

See Also


File: PEExpT.h
Line: 1582

Elements
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.

 
PDEPathOpFlags 
Product availability: All
Platform availability: All

Syntax

enum PDEPathOpFlags {
 kPDEInvisible = 0x00,
 
 kPDEStroke = 0x01,
 
 kPDEFill = 0x02,
 
 kPDEEoFill = 0x04
}

See Also


File: PEExpT.h
Line: 1624

Elements
kPDEInvisible  

The path is neither stroked nor filled, so it is invisible.

 
kPDEStroke  

Stroke the path, as with the S (stroke) operator.

 
kPDEFill  

Fills the path, using the nonzero winding number rule to determine the region to fill, as with the f (fill) operator.

 
kPDEEoFill  

Fills the path, using the even/odd rule to determine the region to fill, as with the f* (eofill) operator.



Method Detail
PDEPathAddSegment()
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEPathAddSegment(INPDEPath path, INASUns32 segType, INASFixed x1, INASFixed y1, INASFixed x2, INASFixed y2, INASFixed x3, INASFixed y3)

Adds a segment to a path. The number of ASFixed values used depends upon segType:

segType

ASFixed values

kPDEMoveTo

  • x1

  • y1

kPDELineTo

  • x1

  • y1

kPDECurveTo

  • x1

  • y1

  • x2

  • y2

  • y3

kPDECurveToV

  • x1

  • y1

  • x2

  • y2

kPDECurveToY

  • x1

  • y1

  • x2

  • y2

kPDERect

  • x1

  • y1

  • x2 (width)

  • y2 (height)

kPDEClosePath

None

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.

See Also

Exceptions

genErrBadParm

Since


File: PEWProcs.h
Line: 1516
PDEPathCreate() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEPath PDEPathCreate()

Creates an empty path element.

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

Returns

An empty path element.

Since


File: PEWProcs.h
Line: 527
PDEPathGetData() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 PDEPathGetData(INPDEPath path, OUTASInt32* data, INASUns32 dataSize)

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

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.

Returns

The length of the data of path.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 773
PDEPathGetDataEx() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 PDEPathGetDataEx(INPDEPath path, OUTASReal* data, INASUns32 dataSize)

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

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.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 3532
PDEPathGetPaintOp() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 PDEPathGetPaintOp(INPDEPath path)

Gets the fill and stroke attributes of a path.

Parameters

path — 

The path whose fill and stroke attributes are obtained.

Returns

A set of PDEPathOpFlags flags describing fill and stroke attributes.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 786
PDEPathSetData() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEPathSetData(INPDEPath path, INASInt32* data, INASUns32 dataSize)

Sets new path data for a path element.

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.

See Also

Exceptions

peErrWrongPDEObjectType
genErrBadParm

Since


File: PEWProcs.h
Line: 501
PDEPathSetDataEx() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEPathSetDataEx(INPDEPath path, INASReal* data, INASUns32 dataSize)

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

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.

See Also

Exceptions

peErrWrongPDEObjectType
genErrBadParm

Since


File: PEWProcs.h
Line: 4158
PDEPathSetPaintOp() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEPathSetPaintOp(INPDEPath path, INASUns32 op)

Sets the fill and stroke attributes of a path.

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.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PEWProcs.h
Line: 516