InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IImageCache Class Referenceabstract

#include <IImageCache.h>

Inheritance diagram for IImageCache:
IPMUnknown

Public Member Functions

virtual void Init (AGMImageAccessor *image, uint32 resolution, uint32 ticksToGenerate, uint32 profileChecksum=0L, const PMMatrix &adjustmentMatrix=PMMatrix())=0
 
virtual uint32 GetResolution (void) const =0
 
virtual uint32 GetSize (void) const =0
 
virtual uint32 GetGenerateTime (void) const =0
 
virtual uint32 GetLastDrawTime (void) const =0
 
virtual uint32 GetDrawCount (void) const =0
 
virtual uint32 GetColorFamily (void) const =0
 
virtual uint32 GetProfileChecksum (void) const =0
 
virtual const PMMatrixGetAdjustmentMatrix (void) const =0
 
virtual AGMImageAccessorGetImageAccessor (void) const =0
 
virtual void Draw (const GraphicsData *gd, IGeometry *imageGeometry, const PMMatrix &additionalXform=PMMatrix(), const AGMColorSpace *colorSpace=nil, const PMReal &tint=kDefaultTintPercent)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IImageCache This class contains an AGM Image plus additional information and metrics used by the ImageCacheManager to determine which IImageCache's should be serialized/virtualized to disk in low memory situations.

Member Function Documentation

virtual void IImageCache::Draw (const GraphicsDatagd,
IGeometryimageGeometry,
const PMMatrixadditionalXform = PMMatrix(),
const AGMColorSpace * colorSpace = nil,
const PMRealtint = kDefaultTintPercent 
)
pure virtual

Draw the cache

Parameters
gd- IN: Pointer to information about the destination device.
imageGeometry- IN: Pointer to the IGeometry of the image's corresponding page item.
additionalXform- IN: If there are additional transforms you want applied to the image while drawing, pass them here.
colorSpace- IN: Used when applying a color to a grayscale image.
tint- IN: Used when applying a color to a grayscale image.
virtual const PMMatrix& IImageCache::GetAdjustmentMatrix (void ) const
pure virtual

Returns the adjustment matrix as specified through Init.

virtual uint32 IImageCache::GetColorFamily (void ) const
pure virtual

Returns one of kPMGrayColorSpace, kPMRGBColorSpace, kPMCMYKColorSpace, kPMICCLabColorSpace

virtual uint32 IImageCache::GetDrawCount (void ) const
pure virtual

Returns the number of times Draw() has been drawn

virtual uint32 IImageCache::GetGenerateTime (void ) const
pure virtual

Returns number of ticks needed to generate the cache as specified in the Init method

virtual AGMImageAccessor* IImageCache::GetImageAccessor (void ) const
pure virtual

Returns the image record - care should be taken not to delete any fields

virtual uint32 IImageCache::GetLastDrawTime (void ) const
pure virtual

Returns the time (in ticks) of the last time this cache was drawn

virtual uint32 IImageCache::GetProfileChecksum (void ) const
pure virtual

Returns the Checksum of the source profile for this image as specified in the Init method.

virtual uint32 IImageCache::GetResolution (void ) const
pure virtual

Returns resolution of the image in the cache as specified in the Init method.

virtual uint32 IImageCache::GetSize (void ) const
pure virtual

Returns size of the image in the cache where the size is defined as the rowbytes * height + the number of colors in the color map (if one exists).

virtual void IImageCache::Init (AGMImageAccessorimage,
uint32 resolution,
uint32 ticksToGenerate,
uint32 profileChecksum = 0L,
const PMMatrixadjustmentMatrix = PMMatrix() 
)
pure virtual

Initialize the ImageCache - image will be owned by the ImageCache and should not be deleted by the client. Image should be a heap ptr and not a stack ptr (i.e., don't pass in the address of a local stack based AGMImageAccessor variable).

Parameters
image- IN: Ptr to a valid non-stack based AGMImageAccessor
resolution- IN: Image resolution. Used as a key by the ImageCacheManager.
ticksToGenerate- IN: A tick is 1/60th of a second. This metric is used by the ImageCacheManager to determine the cost of generating this cache from scratch.
profileChecksum- IN: A checksum of the color profile for the image. This value is used as a key by the ImageCacheManager and is useful if two caches with the same resolution exist for the same page item.
adjustmentMatrix- IN: The adjustment needed to align the image. Used when the image itself doesn't represent all the info needed for this purpose (e.g., transparency effect masks, which require additional translation information). Not used by the image cache manager since it does not change the uniqueness of the cache entry.