DL Logo

PDEClip Typedefs

PDEClip

Header: PEExpT.h:338

Description

A list of PDEElement objects containing a list of PDEPath objects and PDEText objects that describe a clip state. PDEClip objects can be created and built up with PDEClip methods. Any PDEElement object can have PDEClip associated with it. PDEClip objects can contain PDEContainer objects and PDEGroup objects to an arbitrary level of nesting. This allows PDEContainer objects to be used to mark clip objects. PDEGroup objects inside PDEClip objects that contain at least one PDEText and no PDEPath objects have a special meaning. All PDEText objects contained in such a PDEGroup are considered to be part of the same BT/ET block. This means that the union of these PDEText objects makes up a single clipping path, as opposed to the intersection of the PDEText objects.

Related Methods

Syntax

typedef struct _t_PDEClip *PDEClip;

Returned From

Used By

PDEClip Callback Signatures

PDEClipEnumProc

Header: PEExpT.h:2088

Description

A callback for PDEClipFlattenedEnumElems(), which enumerates all of a PDEClip object's PDEElement objects in a flattened manner.

Syntax

ASBool PDEClipEnumProc(IN PDEElement elem, IN void *clientData);

Parameters

elem
IN/OUT The PDEElement currently being enumerated.
clientData
IN/OUT User-supplied data that was passed in the call to PDEClipFlattenedEnumElems().

Returns

If false, enumeration halts. If true, enumeration continues.

Used By

PDEClip Functions

PDEClipAddElem

Header: PEWProcs.h:664

Description

Adds an element to a clip path.

Note: This method increments the reference count of pdeElement.

Related Methods

Syntax

void PDEClipAddElem(IN PDEClip clip, IN ASInt32 addAfterIndex, /* kPDEBeforeFirst */ IN PDEElement pdeElement);

Parameters

clip
IN/OUT The clip path to which an element is added.
addAfterIndex
IN/OUT The index after which to add pdeElement. Use kPDEBeforeFirst to insert an element at the beginning of the clip object.
pdeElement
IN/OUT The element added, which may be a PDEPath, a PDEText, a PDEContainer, a PDEGroup, or a PDEPlace object.

Exceptions

PDEClipCopy

Header: PEWProcs.h:1570

Description

Makes a deep copy of a PDEClip object.

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

It raises an exception if it is unable to allocate memory.

Syntax

PDEClip PDEClipCopy(IN PDEClip srcClip);

Parameters

srcClip
IN/OUT The clipping path to copy.

Returns

The deep copy of srcClip.

PDEClipCreate

Header: PEWProcs.h:698

Description

Creates an empty clip object. This represents a clipping object that has no effect on elements that refer to it.

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

It raises an exception if it is unable to allocate memory.

Syntax

PDEClip PDEClipCreate(void);

Returns

The newly created clip object.

PDEClipFlattenedEnumElems

Header: PERProcs.h:1669

Description

For a given PDEClip, this enumerates all of the PDEElement objects in a flattened manner. In other words, PDEContainer objects and PDEGroup objects nested in the PDEClip will not be handed back, but any PDEPath objects and PDEText objects nested in them will be. Additionally, PDEPlace objects inside the PDEClip are not returned.

Syntax

ASBool PDEClipFlattenedEnumElems(IN PDEClip clip, IN PDEClipEnumProc enumProc, IN void *enumProcClientData);

Parameters

clip
The PDEClip to enumerate.
enumProc
Called with each flattened element. Enumeration continues until all elements have been enumerated, or until enumProc returns false.
enumProcClientData
A pointer to user-supplied data to pass to enumProc each time it is called.

Returns

Returns the value of enumProc. It returns true if successful, false otherwise.

Exceptions

PDEClipGetElem

Header: PERProcs.h:970

Description

Gets an element from a clip object.

Note: This method does not change the reference count of the returned PDEElement.

Related Methods

Syntax

PDEElement PDEClipGetElem(IN PDEClip clip, IN ASInt32 index);

Parameters

clip
IN/OUT The clip object from which an element is obtained.
index
IN/OUT The index of the element to get from clip.

Returns

The element from the clip object.

Exceptions

PDEClipGetNumElems

Header: PERProcs.h:953

Description

Gets the number of top-level elements in a clip object. Top-level elements may be a path or charpath, a marked content container or place, or a group.

Paths are represented as PDEPath objects; charpaths are represented as PDEText objects.

Note: PDEGroup is not a persistent object. You cannot save to PDF and re-get group objects.

Syntax

ASInt32 PDEClipGetNumElems(IN PDEClip clip);

Parameters

clip
IN/OUT The clip object to examine.

Returns

The number of path and charpath elements in clip. If clip contains PDEGroup objects, this method returns the top-level PDEPath, PDEText, PDEContainer, PDEGroup, or PDEPlace object. Use PDEClipFlattenedEnumElems() to see only the PDEPath and PDEText objects.

Exceptions

PDEClipRemoveElems

Header: PEWProcs.h:683

Description

Removes one or more elements from a clip object.

Note: This method decrements the reference count of each of the elements.

Related Methods

Syntax

void PDEClipRemoveElems(IN PDEClip clip, IN ASInt32 index, IN ASInt32 count);

Parameters

clip
IN/OUT The clip object from which an element is removed.
index
IN/OUT The first element to remove.
count
IN/OUT The number of elements to remove.

Exceptions