CBitmap Class Reference

Encapsulates various platform depended kinds of bitmaps. More...

#include <vstgui.h>

List of all members.

Public Member Functions

virtual ~CBitmap ()
virtual bool loadFromResource (const CResourceDescription &resourceDesc)
virtual bool loadFromPath (const void *platformPath)

Public Attributes

virtual VSTGUI_DEPRECATED(void
setTransparencyMask(CDrawContext
*pContext, const CPoint
&offset=CPoint(0,
0));) protected voi 
dispose )()
CResourceDescription resourceDesc
CCoord width
CCoord height
CColor transparentCColor
bool noAlpha
void * pHandle
void * pMask

Constructors



 CBitmap (const CResourceDescription &desc)
 Create a pixmap from a resource identifier.
 CBitmap (CFrame &frame, CCoord width, CCoord height)
 Create a pixmap with a given size.

CBitmap Methods



virtual void draw (CDrawContext *pContext, CRect &rect, const CPoint &offset=CPoint(0, 0))
 Draw the pixmap using a given rect as output position and a given offset of its source pixmap.
virtual void drawTransparent (CDrawContext *pContext, CRect &rect, const CPoint &offset=CPoint(0, 0))
virtual void drawAlphaBlend (CDrawContext *pContext, CRect &rect, const CPoint &offset=CPoint(0, 0), unsigned char alpha=128)
 Same as CBitmap::draw except that it uses the alpha value to draw the bitmap alpha blended.
CCoord getWidth () const
 get the width of the image
CCoord getHeight () const
 get the height of the image
bool isLoaded () const
 check if image is loaded
void * getHandle () const
 get a platform image object. Normally you don't need this
void setTransparentColor (const CColor color)
 set the color of the image which should not be drawn. Works only once on some implementations/platforms.
CColor getTransparentColor () const
 get the current transparent color
void setNoAlpha (bool state)
bool getNoAlpha () const
const CResourceDescriptiongetResourceDescription () const

Reference Counting Methods



virtual void forget ()
 decrease refcount and delete object if refcount == 0
virtual void remember ()
 increase refcount
long getNbReference () const
 get refcount

Message Methods



virtual CMessageResult notify (CBaseObject *sender, const char *message)

Detailed Description

Encapsulates various platform depended kinds of bitmaps.


Constructor & Destructor Documentation

CBitmap ( const CResourceDescription desc  ) 

Create a pixmap from a resource identifier.

CBitmap ( CFrame frame,
CCoord  width,
CCoord  height 
)

Create a pixmap with a given size.

virtual ~CBitmap (  )  [virtual]

Member Function Documentation

virtual void draw ( CDrawContext pContext,
CRect rect,
const CPoint offset = CPoint(0, 0) 
) [virtual]

Draw the pixmap using a given rect as output position and a given offset of its source pixmap.

virtual void drawTransparent ( CDrawContext pContext,
CRect rect,
const CPoint offset = CPoint(0, 0) 
) [virtual]
virtual void drawAlphaBlend ( CDrawContext pContext,
CRect rect,
const CPoint offset = CPoint(0, 0),
unsigned char  alpha = 128 
) [virtual]

Same as CBitmap::draw except that it uses the alpha value to draw the bitmap alpha blended.

CCoord getWidth (  )  const [inline]

get the width of the image

CCoord getHeight (  )  const [inline]

get the height of the image

bool isLoaded (  )  const

check if image is loaded

void* getHandle (  )  const

get a platform image object. Normally you don't need this

void setTransparentColor ( const CColor  color  ) 

set the color of the image which should not be drawn. Works only once on some implementations/platforms.

CColor getTransparentColor (  )  const [inline]

get the current transparent color

void setNoAlpha ( bool  state  )  [inline]
bool getNoAlpha (  )  const [inline]
const CResourceDescription& getResourceDescription (  )  const [inline]
virtual bool loadFromResource ( const CResourceDescription resourceDesc  )  [virtual]
virtual bool loadFromPath ( const void *  platformPath  )  [virtual]
virtual void forget (  )  [inline, virtual, inherited]

decrease refcount and delete object if refcount == 0

Reimplemented in CDrawContext.

virtual void remember (  )  [inline, virtual, inherited]

increase refcount

long getNbReference (  )  const [inline, inherited]

get refcount

virtual CMessageResult notify ( CBaseObject sender,
const char *  message 
) [inline, virtual, inherited]

Member Data Documentation

virtual VSTGUI_DEPRECATED (void setTransparencyMask (CDrawContext* pContext, const CPoint& offset = CPoint (0, 0));) protected voi dispose)()
bool noAlpha
void* pHandle
void* pMask

The documentation for this class was generated from the following file:
Generated on Fri Apr 9 10:19:32 2010 for VSTGUI by  doxygen 1.6.3