You are on page 1of 1

CHAPTER 4: Graphics Graphic page items 120

Solution

Use IClippingPathSuite. This selection suite has everything that you need to perform clipping path
operations, including getting the embedded Photoshop path and alpha channel, setting a clipping path,
and converting a clipping path to a frame. Follow these steps:

1. Query IClippingPathSuite and get current clipping path settings by calling QueryActiveClipSettings.

2. Make necessary changes and call appropriate methods to set the settings.

NOTE: If the item is not selected, we recommend you first select the item first. It is much easier to use the
selection suite than to set a clipping path directly.

Sample code

SnpManipulatePathandGraphics.cpp

Related APIs

ConvertPSResourcesToPMTags.h, IClippingPathSuite

Setting text wrap mode


You can set text wrap mode for a list of page items.

NOTE: When a page item is created, the text wrap mode is set to IStandOff::kNone by default. This applies
to graphic page items, as well.

Solution

Do one of the following:

 We recommend you use the API Facade::ITextWrapFacade::SetMode.

 Alternatively, create and process kStandOffModeCmdBoss directly. Make sure the text wrap modes for
the graphics frame and the graphic page item are the same; otherwise, the graphic page item’s text
wrap mode takes priority. You can set the graphics frame’s mode to kNone and set the graphic page
item’s mode to the desired setting.

Sample code

SnpManipulateTextFrame.cpp

Related APIs

 ITextWrapFacade

 ITextWrapSuite

 kStandOffModeCmdBoss

You might also like