InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IArt Class Referenceabstract
Inheritance diagram for IArt:
PNGArtSVGArt

Public Member Functions

virtual bool SetRsrc (const PluginID &pid, const RsrcID &rid, const bool isRollOver, const bool isDark=false, const float scaleFactor=1.0, const float iconScale=2.0)=0
 
virtual bool SetRsrc (const RsrcSpec &spec, const float scaleFactor=1.0, const float iconScale=2.0)=0
 
virtual bool SetFile (const IDFile &idFile, const float scaleFactor=1.0, const float iconScale=2.0)=0
 
virtual void Draw (IGraphicsPort *gPort, const PMMatrix &imMatrix, int32 agmflags)=0
 
virtual void DrawDisabled (IGraphicsPort *gPort, const PMMatrix &imMatrix, int32 agmflags)=0
 
virtual bool HasAlpha ()=0
 
virtual bool IsLoaded ()=0
 
virtual void Delete ()=0
 
virtual int GetHeight () const =0
 
virtual int GetWidth () const =0
 
virtual AGMImageRecordGetBitmap () const =0
 

Member Function Documentation

virtual void IArt::Delete ()
pure virtual

Deletes the image resource, this is done automatically when this class is destroyed

Implemented in PNGArt, and SVGArt.

virtual void IArt::Draw (IGraphicsPortgPort,
const PMMatriximMatrix,
int32 agmflags 
)
pure virtual

Draw's the image to the supplied graphics port

Parameters
IGraphicsPort,:IGraphicsPort to draw to
PMMatrix,:Transformation matrix to apply to the SVG/PNG, if no translation is desired use the idenity matrix or just a plain PMMatrix.
agmflags,:Any desired AGM flags, use 0 if none are desired.

Implemented in PNGArt, and SVGArt.

virtual void IArt::DrawDisabled (IGraphicsPortgPort,
const PMMatriximMatrix,
int32 agmflags 
)
pure virtual

Draw's the image with a 50% transparensy see regular draw methode for more info.

Implemented in PNGArt, and SVGArt.

virtual AGMImageRecord* IArt::GetBitmap () const
pure virtual
Returns
A pointer to the AGMImageRecord for the loaded image resource

Implemented in PNGArt, and SVGArt.

virtual int IArt::GetHeight () const
pure virtual
Returns
The height of the loaded resource

Implemented in PNGArt, and SVGArt.

virtual int IArt::GetWidth () const
pure virtual
Returns
The width of the loaded resource

Implemented in PNGArt, and SVGArt.

virtual bool IArt::HasAlpha ()
pure virtual

Does the image have a a alpha?

Returns
true if image contains pixels not totally opaque

Implemented in PNGArt, and SVGArt.

virtual bool IArt::IsLoaded ()
pure virtual

Did the image sucessfully load?

Returns
true if loaded

Implemented in PNGArt, and SVGArt.

virtual bool IArt::SetFile (const IDFileidFile,
const float scaleFactor = 1.0,
const float iconScale = 2.0 
)
pure virtual

Deletes any currently loaded resource and loads an image file resource in from the supplied file.

Parameters
pathto a file
floatscale factor at which image should be displayed.
floatscale of the icon.
Returns
true if file / resource was loaded

Implemented in PNGArt, and SVGArt.

virtual bool IArt::SetRsrc (const PluginIDpid,
const RsrcID & rid,
const bool isRollOver,
const bool isDark = false,
const float scaleFactor = 1.0,
const float iconScale = 2.0 
)
pure virtual

Deletes any currently loaded resource and loads an image from a plugin's resource. This is the preferred approach.

Parameters
PluginID,:PluginId to load the resource from
RsrcID,:Resource ID of the image
bool,:Rollover resource?
bool,:Dark UI resource?
floatscale factor at which image should be displayed.
floatscale of the icon.
Returns
true if file / resource was loaded

Implemented in PNGArt, and SVGArt.