VSTGUI  4.3
Graphical User Interface Framework not only for VST plugins
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
CNinePartTiledBitmap Class Reference

a nine-part tiled bitmap More...

+ Inheritance diagram for CNinePartTiledBitmap:
+ Collaboration diagram for CNinePartTiledBitmap:

Public Member Functions

 CNinePartTiledBitmap (const CResourceDescription &desc, const CNinePartTiledDescription &offsets)
 
 CNinePartTiledBitmap (IPlatformBitmap *platformBitmap, const CNinePartTiledDescription &offsets)
 
 ~CNinePartTiledBitmap ()
 
virtual void draw (CDrawContext *context, const CRect &rect, const CPoint &offset=CPoint(0, 0), float alpha=1.f)
 
virtual bool isTypeOf (IdStringPtr s) const
 
virtual CBaseObjectnewCopy () const
 
virtual void beforeDelete ()
 
Part Offsets
void setPartOffsets (const CNinePartTiledDescription &partOffsets)
 
const CNinePartTiledDescriptiongetPartOffsets () const
 
CBitmap Methods
CCoord getWidth () const
 get the width of the image More...
 
CCoord getHeight () const
 get the height of the image More...
 
bool isLoaded () const
 check if image is loaded More...
 
const CResourceDescriptiongetResourceDescription () const
 
IPlatformBitmap * getPlatformBitmap () const
 
void setPlatformBitmap (IPlatformBitmap *bitmap)
 
bool addBitmap (IPlatformBitmap *platformBitmap)
 
IPlatformBitmap * getBestPlatformBitmapForScaleFactor (double scaleFactor) const
 
Reference Counting Methods
virtual void forget ()
 decrease refcount and delete object if refcount == 0 More...
 
virtual void remember ()
 increase refcount More...
 
virtual int32_t getNbReference () const
 get refcount More...
 
Message Methods
virtual CMessageResult notify (CBaseObject *sender, IdStringPtr message)
 

Protected Types

typedef SharedPointer
< IPlatformBitmap > 
BitmapPointer
 
typedef std::vector
< BitmapPointer
BitmapVector
 

Protected Attributes

CNinePartTiledDescription offsets
 
CResourceDescription resourceDesc
 
BitmapVector bitmaps
 

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 right corner
  • bottom left corner
  • bottom right corner
  • top edge, repeated as often as necessary and clipped appropriately
  • left edge, dto.
  • right edge, dto.
  • bottom edge, dto.
  • center, repeated horizontally and vertically as often as necessary
|------------------------------------------------------------------------------------------------|
| 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 Typedef Documentation

typedef SharedPointer<IPlatformBitmap> BitmapPointer
protectedinherited
typedef std::vector<BitmapPointer> BitmapVector
protectedinherited

Constructor & Destructor Documentation

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

Member Function Documentation

bool addBitmap ( IPlatformBitmap *  platformBitmap)
inherited

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void beforeDelete ( )
inlinevirtualinherited

Reimplemented in CView.

+ Here is the caller graph for this function:

void draw ( CDrawContext context,
const CRect rect,
const CPoint offset = CPoint (0, 0),
float  alpha = 1.f 
)
virtual

Reimplemented from CBitmap.

+ Here is the call graph for this function:

virtual void forget ( )
inlinevirtualinherited

decrease refcount and delete object if refcount == 0

+ Here is the call graph for this function:

IPlatformBitmap * getBestPlatformBitmapForScaleFactor ( double  scaleFactor) const
inherited
CCoord getHeight ( ) const
inherited

get the height of the image

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual int32_t getNbReference ( ) const
inlinevirtualinherited

get refcount

const CNinePartTiledDescription& getPartOffsets ( ) const
inline
IPlatformBitmap * getPlatformBitmap ( ) const
inherited

+ Here is the caller graph for this function:

const CResourceDescription& getResourceDescription ( ) const
inlineinherited
CCoord getWidth ( ) const
inherited

get the width of the image

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool isLoaded ( ) const
inlineinherited

check if image is loaded

+ Here is the call graph for this function:

virtual bool isTypeOf ( IdStringPtr  s) const
inlinevirtual

Reimplemented from CBitmap.

virtual CBaseObject* newCopy ( ) const
inlinevirtual

Reimplemented from CBitmap.

virtual void remember ( )
inlinevirtualinherited

increase refcount

+ Here is the caller graph for this function:

void setPartOffsets ( const CNinePartTiledDescription partOffsets)
inline
void setPlatformBitmap ( IPlatformBitmap *  bitmap)
inherited

+ Here is the caller graph for this function:

Member Data Documentation

BitmapVector bitmaps
protectedinherited
CNinePartTiledDescription offsets
protected
CResourceDescription resourceDesc
protectedinherited

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