You are on page 1of 1

4 Graphics

Chapter Update Status


CS6 Unchanged

Introduction
This chapter provides implementation hints for common use cases and answers frequently asked
questions involving the Adobe InDesign graphics API.

Paths
Obtaining path information
You can get path information from a page item, such as a spline item, text outline, and text wrap.

Solution

Use the IPathGeometry interface to retrieve the path information, as follows:

1. Determine what type of path you are looking for, and make sure you look in the right page item for the
path. (Do not confuse the graphic page item with the graphics frame.) For example:

 For information about the clipping path, look in the graphic page item, not the graphics frame.

 For information about the text wrap path of a graphic page item, look for the text wrap object
(defined as kStandOffPageItemBoss).

 For information about the path of a spline item (frames, lines, and curves), look for the
kSplineItemBoss item.

 For information about the outline paths of characters in a segment of text, you need to create the
text outline and look for the newly created inline spline item.

2. Query the IPathGeometry interface on the page item boss to get the path information you want, using
various methods to get such information as the number of paths, number of segments, number of
path points, and path bounding box.

Sample code

 SnpInspectPathInfo.cpp

 SnpSelectShape.cpp

113

You might also like