CNinePartTiledBitmap Class Reference
[Version 4.0]

a nine-part tiled bitmap More...

Inheritance diagram for CNinePartTiledBitmap:
Inheritance graph
[legend]
Collaboration diagram for CNinePartTiledBitmap:
Collaboration graph
[legend]

List of all members.

Classes

struct  PartOffsets

Public Member Functions

 CNinePartTiledBitmap (const CResourceDescription &desc, const PartOffsets &offsets)
 CNinePartTiledBitmap (IPlatformBitmap *platformBitmap, const PartOffsets &offsets)
 ~CNinePartTiledBitmap ()
virtual void draw (CDrawContext *context, const CRect &rect, const CPoint &offset=CPoint(0, 0), float alpha=1.f)
Part Offsets



void setPartOffsets (const PartOffsets &partOffsets)
const PartOffsetsgetPartOffsets () const
CBitmap Methods



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
const CResourceDescriptiongetResourceDescription () const
IPlatformBitmap * getPlatformBitmap () const
void setPlatformBitmap (IPlatformBitmap *bitmap)
Reference Counting Methods



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



virtual CMessageResult notify (CBaseObject *sender, IdStringPtr message)

Protected Types

enum  {
  kPartTopLeft, kPartTop, kPartTopRight, kPartLeft,
  kPartCenter, kPartRight, kPartBottomLeft, kPartBottom,
  kPartBottomRight, kPartCount
}

Protected Member Functions

virtual void drawParts (CDrawContext *pContext, const CRect &rect, float alpha=1.f)
virtual void calcPartRects (const CRect &inBitmapRect, const PartOffsets &inPartOffset, CRect *outRect)
virtual void drawPart (CDrawContext *inContext, const CRect &inSourceRect, const CRect &inDestRect, float inAlpha=1.f)

Protected Attributes

PartOffsets offsets
CResourceDescription resourceDesc
IPlatformBitmap * platformBitmap

Detailed Description

a nine-part tiled bitmap

A nine-part tiled bitmap is tiled in nine parts which are drawing according to its part offsets:

|------------------------------------------------------------------------------------------------|
| Top-Left Corner    |         <----        Top Edge        ---->          |    Top-Right Corner |
|--------------------|-----------------------------------------------------|---------------------|
|         ^          |                         ^                           |          ^          |
|         |          |                         |                           |          |          |
|     Left Edge      |         <----         Center         ---->          |      Right Edge     |
|         |          |                         |                           |          |          |
|         v          |                         v                           |          v          |
|--------------------|-----------------------------------------------------|---------------------|
| Bottom-Left Corner |         <----       Bottom Edge      ---->          | Bottom-Right Corner |
|------------------------------------------------------------------------------------------------|

Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
kPartTopLeft 
kPartTop 
kPartTopRight 
kPartLeft 
kPartCenter 
kPartRight 
kPartBottomLeft 
kPartBottom 
kPartBottomRight 
kPartCount 

Constructor & Destructor Documentation

CNinePartTiledBitmap ( const CResourceDescription desc,
const PartOffsets offsets 
)
CNinePartTiledBitmap ( IPlatformBitmap *  platformBitmap,
const PartOffsets offsets 
)

Member Function Documentation

void calcPartRects ( const CRect inBitmapRect,
const PartOffsets inPartOffset,
CRect outRect 
) [protected, virtual]
void draw ( CDrawContext context,
const CRect rect,
const CPoint offset = CPoint (0, 0),
float  alpha = 1.f 
) [virtual]

Reimplemented from CBitmap.

void drawPart ( CDrawContext inContext,
const CRect inSourceRect,
const CRect inDestRect,
float  inAlpha = 1.f 
) [protected, virtual]
void drawParts ( CDrawContext pContext,
const CRect rect,
float  alpha = 1.f 
) [protected, virtual]
virtual void forget (  )  [inline, virtual, inherited]

decrease refcount and delete object if refcount == 0

CCoord getHeight (  )  const [inherited]

get the height of the image

virtual int32_t getNbReference (  )  const [inline, virtual, inherited]

get refcount

const PartOffsets& getPartOffsets (  )  const [inline]
IPlatformBitmap* getPlatformBitmap (  )  const [inline, inherited]
const CResourceDescription& getResourceDescription (  )  const [inline, inherited]
CCoord getWidth (  )  const [inherited]

get the width of the image

bool isLoaded (  )  const [inline, inherited]

check if image is loaded

virtual CMessageResult notify ( CBaseObject sender,
IdStringPtr  message 
) [inline, virtual, inherited]
virtual void remember (  )  [inline, virtual, inherited]

increase refcount

void setPartOffsets ( const PartOffsets partOffsets  )  [inline]
void setPlatformBitmap ( IPlatformBitmap *  bitmap  )  [inherited]

Member Data Documentation

PartOffsets offsets [protected]
IPlatformBitmap* platformBitmap [protected, inherited]
CResourceDescription resourceDesc [protected, inherited]

The documentation for this class was generated from the following files:

Generated on Fri Nov 22 11:09:30 2013 for VSTGUI by  doxygen 1.6.1