LayerPDFEdit_Layer
ObjectPDEClip

A PDEClip is a list of PDEElement objects containing a list of PDEPath objects and PDEText objects that describe a clipping state. PDEClip objects can be created and built up with PDEClip methods. Any PDEElement object can have PDEClip associated with it by using the PDEElementSetClip() method.



Typedef Summary
 Typedef
 PDEClip
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.
Callback Summary
 Callback
 PDEClipEnumProc
A callback for PDEClipFlattenedEnumElems(), which enumerates all of a PDEClip object's PDEElement objects in a flattened manner.
Method Summary
 Method
 
void PDEClipAddElem(INPDEClip clip, INASInt32 addAfterIndex, INPDEElement pdeElement)
Adds an element to a clip path.
 
PDEClip PDEClipCopy(INPDEClip srcClip)
Makes a deep copy of a PDEClip object.
 
PDEClip PDEClipCreate()
Creates an empty clip object. This represents a clipping object that has no effect on elements that refer to it.
 
ASBool PDEClipFlattenedEnumElems(INPDEClip clip, INPDEClipEnumProc enumProc, IN void* enumProcClientData)
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.
 
PDEElement PDEClipGetElem(INPDEClip clip, INASInt32 index)
Gets an element from a clip object.
 
ASInt32 PDEClipGetNumElems(INPDEClip clip)
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.
 
void PDEClipRemoveElems(INPDEClip clip, INASInt32 index, INASInt32 count)
Removes one or more elements from a clip object.

Typedefs Detail
PDEClip 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef struct _t_PDEClip* PDEClip;

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.

See Also


File: PEExpT.h
Line: 339


Callbacks Detail
PDEClipEnumProc 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

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

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

See Also


File: PEExpT.h
Line: 2001

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

Syntax

void PDEClipAddElem(INPDEClip clip, INASInt32 addAfterIndex, INPDEElement pdeElement)

Adds an element to a clip path.

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.

See Also

Exceptions

peErrWrongPDEObjectType
genErrBadParm

Since

Note

This method increments the reference count of pdeElement.

File: PEWProcs.h
Line: 730
PDEClipCopy() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEClip PDEClipCopy(INPDEClip srcClip)

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.

Parameters

srcClip — 

IN/OUT The clipping path to copy.

Returns

The deep copy of srcClip.

Since


File: PEWProcs.h
Line: 1728
PDEClipCreate() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEClip PDEClipCreate()

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.

Returns

The newly created clip object.

Since


File: PEWProcs.h
Line: 765
PDEClipFlattenedEnumElems() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDEClipFlattenedEnumElems(INPDEClip clip, INPDEClipEnumProc enumProc, IN void* enumProcClientData)

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.

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.

See Also

Exceptions

peErrWrongPDEObjectType
genErrBadParm

Since


File: PERProcs.h
Line: 1837
PDEClipGetElem() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEElement PDEClipGetElem(INPDEClip clip, INASInt32 index)

Gets an element from a clip object.

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.

See Also

Exceptions

peErrWrongPDEObjectType
genErrBadParm

Since

Note

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

File: PERProcs.h
Line: 1053
PDEClipGetNumElems() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 PDEClipGetNumElems(INPDEClip clip)

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.

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.

See Also

Exceptions

peErrWrongPDEObjectType
genErrBadParm

Since

Note

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

File: PERProcs.h
Line: 1034
PDEClipRemoveElems() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEClipRemoveElems(INPDEClip clip, INASInt32 index, INASInt32 count)

Removes one or more elements from a clip object.

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.

See Also

Exceptions

peErrWrongPDEObjectType
genErrBadParm

Since

Note

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

File: PEWProcs.h
Line: 750