InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TranFxMatteFactory Class Reference

#include <TranFxMatteFactory.h>

Public Member Functions

 TranFxMatteFactory ()
 
virtual ~TranFxMatteFactory ()
 
const AGMImageAccessorMakeMatte (IShape *iShape, const PMReal &resolution, const DrawOptionsSet &drawOptionsSet, const bool16 enableCaching)
 
PBPMRect GetBoundingBox (IShape *iShape) const
 
bool16 GetPaintedBBoxWithoutMatte (IShape *iShape, PBPMRect &bounds) const
 
void PurgeImageCache (const UIDList &itemList)
 
void PurgeWholeCache (const UIDRef &documentUIDRef)
 

Detailed Description

Helps with the creation and caching of this plug-in's effect images.

See Also
TranFxConvolutionFilter
SnapshotUtils
IImageCacheMgr
IImageCache

Constructor & Destructor Documentation

TranFxMatteFactory::TranFxMatteFactory ()

Constructor.

TranFxMatteFactory::~TranFxMatteFactory ()
virtual

Destructor.

Member Function Documentation

PMRect TranFxMatteFactory::GetBoundingBox (IShapeiShape) const

Return the bounds of the matte in pasteboard co-ordinates.

Parameters
iShapeIN the object whose matte bounds are desired.
Returns
the bounds of the matte image.
bool16 TranFxMatteFactory::GetPaintedBBoxWithoutMatte (IShapeiShape,
PBPMRectbounds 
) const

Get the painted bounds of the given shape not including the area that would be drawn by the matte effect. This uses IShape::GetPaintedBBox so if the given shape draws outside of its bounds (e.g. text on a path) bounds returned will reflect this. Since this IShape call will result in our adornment's TranFxAdornment::GetPaintedBBox being called, the implementation checks and blocks recursive calls.

Parameters
iShapeIN the object whose painted bounds are desired.
boundsIN/OUT the painted bounding box (caller must check the return value is kTrue before relying on this value).
Returns
kTrue if the painted bounds are available, kFalse if a recursive call has been detected and the bounds are not being returned.
const AGMImageAccessor * TranFxMatteFactory::MakeMatte (IShapeiShape,
const PMRealresolution,
const DrawOptionsSetdrawOptionsSet,
const bool16 enableCaching 
)

Generate a grey level matte image based on the current effect control flags.

Parameters
iShapeIN the object for which matte is to be generated.
resolutionIN desired resolution of the matte.
drawOptionsSetIN draw options controlling matte quality.
enableCachingIN kTrue to enable caching or matte via IImageCacheMgr, kFalse otherwise
Returns
pointer to AGMImageAccessor containing the matte image (the caller should not delete this memory).
void TranFxMatteFactory::PurgeImageCache (const UIDListitemList)

Purge cached images for the given itemList.

Parameters
itemListIN objects whose cached images are to be purged.
void TranFxMatteFactory::PurgeWholeCache (const UIDRefdocumentUIDRef)

Purge all images this plug-in has cached for the given document.

Parameters
documentUIDRefIN document containing objects whose cached images are to be purged.