![]() | InDesign SDK 20.5 |
#include <IPathUtils.h>

Public Types | |
| enum | { kDefaultIID = IID_IPATHUTILS } |
Public Member Functions | |
| virtual bool16 | CalculateDirectionPoints (const IPathGeometry *iPathGeometry, const PMPathPoint &thePoint, const int32 pathIndex, const int32 pointIndex, PMPoint &leftDirPt, PMPoint &rightDirPt) const =0 |
Spline creation methods. | |
These methods process commands. Make sure to use a sequence to include them with other commands. | |
| virtual UIDRef | CreateRectangleSpline (const UIDRef &parent, PMRect &boundsRect, INewPageItemCmdData::GraphicAttrType attrType, ClassID itemClass, bool16 bAllowDefaultStandOff=kTrue, const Transform::CoordinateSpace &boundsSpace=Transform::PasteboardCoordinates(), INewPageItemCmdData::ObjectStyleApplication howToApplyObjStyle=INewPageItemCmdData::kCommandAppliesObjectStyle) const =0 |
| virtual UIDRef | CreateRectangleSpline (const UIDRef &parent, PMRect &boundsRect, INewPageItemCmdData::GraphicAttrType attrType, bool16 bAllowDefaultStandOff=kTrue, const Transform::CoordinateSpace &boundsSpace=Transform::PasteboardCoordinates()) const =0 |
| virtual UIDRef | CreateOvalSpline (const UIDRef &parent, PMRect &boundsRect, INewPageItemCmdData::GraphicAttrType attrType, bool16 bAllowDefaultStandOff=kTrue, const Transform::CoordinateSpace &boundsSpace=Transform::PasteboardCoordinates()) const =0 |
| virtual UIDRef | CreateLineSpline (const UIDRef &parent, const PMPointList &pathPoints, INewPageItemCmdData::GraphicAttrType attrType, bool16 bAllowDefaultStandOff=kTrue, const Transform::CoordinateSpace &boundsSpace=Transform::PasteboardCoordinates()) const =0 |
| virtual UIDRef | CreateSpline (const UIDRef &parent, const PMPathPointList &pathPointList, INewPageItemCmdData::GraphicAttrType attrType, bool16 bAllowDefaultStandOff=kTrue, bool16 bClosedPath=kTrue, const Transform::CoordinateSpace &boundsSpace=Transform::PasteboardCoordinates()) const =0 |
| virtual UIDRef | CreateRegPolySpline (const UIDRef &parent, PMRect &boundsRect, int32 numSides, int32 starInset, INewPageItemCmdData::GraphicAttrType attrType, bool16 bAllowDefaultStandOff=kTrue, const Transform::CoordinateSpace &boundsSpace=Transform::PasteboardCoordinates()) const =0 |
Path-making functions | |
| virtual void | MakeLinePath (IPathGeometry *iPathGeometry, const PMPointList &pathPoints) const =0 |
| virtual void | MakeRectanglePath (IPathGeometry *iPathGeometry, const PMRect &boundsRect) const =0 |
| virtual void | MakeOvalPath (IPathGeometry *iPathGeometry, const PMRect &boundsRect) const =0 |
| virtual void | MakeRegPolyPath (IPathGeometry *iPathGeometry, const PMRect &boundsRect, int32 numSides, int32 starInset) const =0 |
| virtual void | MakeSplinePath (IPathGeometry *iPathGeometry, const PMPathPointList &pathPointList, bool16 bClosePath=kTrue) const =0 |
| virtual void | MakeUnitCirclePolygon (PMPointList &polyPts, int32 numSides, int32 starInset) const =0 |
Type-of-pageitem functions | |
| virtual bool16 | IsSquare (const IPathGeometry *iPathGeometry) const =0 |
| virtual bool16 | IsRectangle (const IPathGeometry *iPathGeometry) const =0 |
| virtual bool16 | IsPoint (const IPathGeometry *iPathGeometry) const =0 |
| virtual bool16 | IsLine (const IPathGeometry *iPathGeometry) const =0 |
| virtual bool16 | IsOval (const IPathGeometry *iPathGeometry) const =0 |
| virtual bool16 | IsCircle (const IPathGeometry *iPathGeometry) const =0 |
| virtual bool16 | IsPolygon (const IPathGeometry *iPathGeometry) const =0 |
| virtual bool16 | IsCompoundPath (const IPathGeometry *iPathGeometry) const =0 |
| virtual PMPageItemType | WhichKindOfPageItem (const IPathGeometry *iPathGeometry) const =0 |
Selection-related functions | |
| virtual void | AppendPathPointSelectors (IPathGeometry *pathGeom, int32 pathIndex, PointSelectorList &pts) const =0 |
| virtual void | AppendAllPathPointSelectors (IPathGeometry *pathGeom, PointSelectorList &pts) const =0 |
| virtual bool16 | IsPathSelectable (const IPMUnknown *pageItem) const =0 |
| virtual bool16 | IsPathSelectable (const UIDRef &pageItem) const =0 |
| virtual void | AppendNonPathSelectables (const UIDList &selectionList, UIDList &itemList) const =0 |
| virtual void | FilterUnselectedPathObjects (const IPathSelectionSuite *pathSelectionSuite, UIDList &itemList) const =0 |
| virtual void | FilterNonPathSelectables (UIDList &itemList) const =0 |
| virtual bool16 | AllPointsOnObjectSelected (IPathSelectionList *pathSelectionList, IPathGeometry *pathGeom) const =0 |
| virtual bool16 | AllPointsOnObjectSelected (IPathGeometry *pathGeom, const PointSelectorList &pts) const =0 |
| virtual bool16 | AllPointsOnPathSelected (IPathGeometry *pathGeom, int32 pathIndex, const PointSelectorList &pts) const =0 |
Other functions | |
| virtual PMRect | GetPolyPathBBox (const PMPointList &polyPts) const =0 |
| virtual IHandleShape * | QueryHandleShape (bool16 tryPathHandleShape, const UIDRef &item) const =0 |
| virtual IHandleShape * | QueryHandleShape (bool16 tryPathHandleShape, IPMUnknown *iUnknown) const =0 |
| virtual bool16 | IsAnyPathOpen (const IPathGeometry *iPathGeometry) const =0 |
| virtual bool16 | IsValidSelector (const IPathGeometry *pathGeom, const PointSelector &handle) const =0 |
| virtual PMRect::PointIndex | GetVisualPointIndex (const PointSelector &controlPtIndex, ITransform *itemTransform) const =0 |
| virtual void | GetPathSelectableUIDList (UIDList *resultList, IHierarchy *hierarchy)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Utilities for working with paths.
| pure virtual |
Tell whether all the path points of a pageitem are represented in a path selection list.
| pathSelectionList | [IN] The IPathSelectionList interface to check. |
| pathGeom | [IN] The IPathGeometry interface for the pageitem. |
| pure virtual |
Tell whether all the path points of a particular subpath of a pageitem are represented in a path selection list.
| pathSelectionList | [IN] The IPathSelectionList interface to check. |
| pathGeom | [IN] The IPathGeometry interface for the pageitem. |
| pathIndex | [IN] The index of the subpath to check in the pageitem. |
| pure virtual |
Append all of a pageitem's path to a list of point selectors.
| pathGeom | [IN] IPathGeometry pointer for the pageitem. |
| pts | [IN/OUT] The list the path's point selectors are appended to. |
| pure virtual |
Appends non-path-selectable items to a list. Note that if the selectionList contains parent non-path items (e.g. groups) and itemList as passed in contains all the child items, the child items will be removed. Don't want parent and child items in same list.
| pure virtual |
Append a portion of a pageitem's path to a list of point selectors.
| pathGeom | [IN] IPathGeometry pointer for the pageitem. |
| pathIndex | [IN] Which subpath to retrieve. |
| pts | [IN/OUT] The list the subpath's point selectors are appended to. |
| pure virtual |
Compute the default left and right direction points for a given PMPathPoint.
| iPathGeometry | [IN] Pointer to IPathGeometry to contain the path. |
| pathPoint | [IN] an anchor PMPathPoint, must be on the iPathGeometry |
| pathIndex | [IN] Which subpath on iPathGeometry to use. |
| pointIndex | [IN] Which index the pathPoint is on its subpath. |
| leftDirPt | [OUT] a computed left direction point |
| rightDirPt | [OUT] a computed right direction point |
| pure virtual |
Creates a page item and fills out the points describing a line. The classID used for the item is kSplineItemBoss.
| parent | [IN] The parent for this item (typically a layer). |
| pathPoints | [IN] The start and end points for the line. |
| attrType | [IN] Type of graphic attributes to assign to the item. |
| bAllowDefaultStandoff | [IN] Passed to INewPageItemCmdData::SetAllowDefaultStandOff() when the item is created. |
| boundsSpace | [IN] Specifies the coordinate space for the points. Choices are IGeometry::kPasteboardCoordinateSpace (default) or IGeometry::kInnerCoordinateSpace (which means the points are already in the coordinate space of the parent item). |
| pure virtual |
Creates a page item and fills out the points describing an oval. The classID used for the item is kSplineItemBoss.
| parent | [IN] The parent for this item (typically a layer). |
| boundsRect | [IN] Where the item should be positioned. |
| attrType | [IN] Type of graphic attributes to assign to the item. |
| bAllowDefaultStandoff | [IN] Passed to INewPageItemCmdData::SetAllowDefaultStandOff() when the item is created. |
| boundsSpace | [IN] Specifies the coordinate space for the bounds. Choices are IGeometry::kPasteboardCoordinateSpace (default) or IGeometry::kInnerCoordinateSpace (which means the bounds are already in the coordinate space of the parent item). |
| pure virtual |
Creates a page item and fills out the points describing a rectangle.
| parent | [IN] The parent for this item (typically a layer). |
| boundsRect | [IN] Where the item should be positioned. |
| attrType | [IN] Type of graphic attributes to assign to the item. |
| itemClass | [IN] Boss class to use for new item. |
| bAllowDefaultStandoff | [IN] Passed to INewPageItemCmdData::SetAllowDefaultStandOff() when the item is created. |
| boundsSpace | [IN] Specifies the coordinate space for the bounds. Choices are IGeometry::kPasteboardCoordinateSpace (default) or IGeometry::kInnerCoordinateSpace (which means the bounds are already in the coordinate space of the parent item). |
| howToApplyObjStyle | [IN] how to apply the object style |
| pure virtual |
Creates a page item and fills out the points describing a rectangle. The classID used for the item is kSplineItemBoss.
| parent | [IN] The parent for this item (typically a layer). |
| boundsRect | [IN] Where the item should be positioned. |
| attrType | [IN] Type of graphic attributes to assign to the item. |
| bAllowDefaultStandoff | [IN] Passed to INewPageItemCmdData::SetAllowDefaultStandOff() when the item is created. |
| boundsSpace | [IN] Specifies the coordinate space for the bounds. Choices are IGeometry::kPasteboardCoordinateSpace (default) or IGeometry::kInnerCoordinateSpace (which means the bounds are already in the coordinate space of the parent item). |
| pure virtual |
Creates a page item and fills out the points describing a regular spline shape. The classID used for the item is kSplineItemBoss.
| parent | [IN] The parent for this item (typically a layer). |
| boundsRect | [IN] The bounds for the item. |
| numSides | [IN] The number of sides (or points, if using a non-zero starInset) for the polygon. |
| starInset | [IN] The amount of "star inset," or depth of the inset between points, as a percentage of the circumscribing circle's radius (0-100). A value of zero results in no inset. |
| attrType | [IN] Type of graphic attributes to assign to the item. |
| bAllowDefaultStandoff | [IN] Passed to INewPageItemCmdData::SetAllowDefaultStandOff() when the item is created. |
| boundsSpace | [IN] Specifies the coordinate space for the bounds. Choices are IGeometry::kPasteboardCoordinateSpace (default) or IGeometry::kInnerCoordinateSpace (which means the bounds are already in the coordinate space of the parent item). |
| pure virtual |
Creates a page item and fills out the points describing an arbitrary spline shape. The classID used for the item is kSplineItemBoss.
| parent | [IN] The parent for this item (typically a layer). |
| pathPointList | [IN] The path points for the spline. |
| attrType | [IN] Type of graphic attributes to assign to the item. |
| bAllowDefaultStandoff | [IN] Passed to INewPageItemCmdData::SetAllowDefaultStandOff() when the item is created. |
| bClosedPath | [IN] kTrue to create a closed path. |
| boundsSpace | [IN] Specifies the coordinate space for the points. Choices are IGeometry::kPasteboardCoordinateSpace (default) or IGeometry::kInnerCoordinateSpace (which means the points are already in the coordinate space of the parent item). |
| pure virtual |
Filter out non-path selectable page items.
| itemList | [IN/OUT] UIDList of items to filter. Items which are not path-selectable are removed on output. |
| pure virtual |
Filter out any path selectable page items that currently have no path components selected.
| pathSelectionSuite | [IN] IPathSelectionSuite interface from current selection. |
| itemList | [IN/OUT] UIDList of pageitems to filter. Items which are path-selectable but which currently have no path components selected are removed from this list on output. |
| pure virtual |
Fill in a UIDList containing the first level path-selectable items, given a hierarchy. Will navigate down groups. Used for group selection tool page item collection (option/alt + direct select tool).
| resultList | [IN/OUT] A UIDList initialized with the database, to hold the results. |
| hierarchy | [IN] The IHierarchy interface for the item to start from. |
| pure virtual |
Get the bounding box for a polygonal path.
| polyPts | [IN] The list of points for the path. |
| pure virtual |
Map point index to a visual index with respect to the user. Takes transform (flip) into account.
| controlPtIndex | [IN] The point to check. |
| itemTransform | [IN] The ITransform interface for the pageitem. |
| pure virtual |
Tell whether any paths of an item are open.
| iPathGeometry | [IN] IPathGeometry of the item to check. |
| pure virtual |
Tell whether the path is a circle.
| iPathGeometry | [IN] IPathGeometry interface for the path in question. |
| pure virtual |
Tell whether the path is a compound path.
| iPathGeometry | [IN] IPathGeometry interface for the path in question. |
| pure virtual |
Tell whether the path is a line.
| iPathGeometry | [IN] IPathGeometry interface for the path in question. |
| pure virtual |
Tell whether the path is an oval.
| iPathGeometry | [IN] IPathGeometry interface for the path in question. |
| pure virtual |
Tell whether a pageitem could support a path selection.
| pageItem | [IN] Interface pointer for pageitem. |
| pure virtual |
Tell whether a pageitem could support a path selection.
| pageItem | [IN] UIDRef for pageitem. |
| pure virtual |
Tell whether the path is a single point.
| iPathGeometry | [IN] IPathGeometry interface for the path in question. |
| pure virtual |
Tell whether the path is a polygon.
| iPathGeometry | [IN] IPathGeometry interface for the path in question. |
| pure virtual |
Tell whether the path is a rectangle.
| iPathGeometry | [IN] IPathGeometry interface for the path in question. |
| pure virtual |
Tell whether the path is a square.
| iPathGeometry | [IN] IPathGeometry interface for the path in question. |
| pure virtual |
Validate a point selector against a pageitem.
| pathGeom | [IN] IPathGeometry of the pageitem. |
| handle | [IN] PointSelector to validate. |
| pure virtual |
Make a line path.
| iPathGeometry | [IN] Pointer to IPathGeometry to contain the path. |
| pathPoints | [IN] List of points for the path. |
| pure virtual |
Make an oval path.
| iPathGeometry | [IN] Pointer to IPathGeometry to contain the path. |
| boundsRect | [IN] Bounds rectangle for the path. |
| pure virtual |
Make a rectangle path.
| iPathGeometry | [IN] Pointer to IPathGeometry to contain the path. |
| boundsRect | [IN] Bounds rectangle for the path. |
| pure virtual |
Make a regular polygon path.
| iPathGeometry | [IN] Pointer to IPathGeometry to contain the path. |
| boundsRect | [IN] Bounds rectangle for the path. |
| numSides | [IN] The number of sides (or points, if using a non-zero starInset) for the polygon. |
| starInset | [IN] The amount of "star inset," or depth of the inset between points, as a percentage of the circumscribing circle's radius (0-100). A value of zero results in no inset. |
| pure virtual |
Make an arbitrary spline path.
| iPathGeometry | [IN] Pointer to IPathGeometry to contain the path. |
| pathPointList | [IN] List of points for the path. |
| bClosePath | [IN] kTrue to create a closed path. |
| pure virtual |
Make a list of points describing a regular polygon that fits inside a 100-unit circle, with optional star inset.
| polyPts | [IN] The list to receive the points. |
| numSides | [IN] The number of sides (or points, if using a non-zero starInset) for the polygon. |
| starInset | [IN] The amount of "star inset," or depth of the inset between points, as a percentage of the circumscribing circle's radius (0-100). A value of zero results in no inset. |
| pure virtual |
Query the IHandleShape interface for a pageitem.
| tryPathHandleShape | [IN] kTrue to get IID_IPATHHANDLESHAPE interface; kFalse to get IID_IHANDLESHAPE. |
| item | [IN] UIDRef of the pageitem. |
| pure virtual |
Query the IHandleShape interface for a pageitem.
| tryPathHandleShape | [IN] kTrue to get IID_IPATHHANDLESHAPE interface; kFalse to get IID_IHANDLESHAPE. |
| iUnknown | [IN] An interface pointer on the pageitem. |
| pure virtual |
Tells the type of pageitem for a path.
| iPathGeometry | [IN] IPathGeometry interface for the path in question. |