VSTGUI  4.4
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:

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
 
Part Offsets
void setPartOffsets (const CNinePartTiledDescription &partOffsets)
 
const CNinePartTiledDescriptiongetPartOffsets () const
 
- Public Member Functions inherited from CBitmap
 CBitmap (const CResourceDescription &desc)
 Create a pixmap from a resource identifier. More...
 
 CBitmap (CCoord width, CCoord height)
 Create a pixmap with a given size. More...
 
 CBitmap (IPlatformBitmap *platformBitmap)
 
 ~CBitmap ()
 
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
 
- Public Member Functions inherited from CBaseObject
 CBaseObject ()
 
virtual ~CBaseObject ()
 
virtual void beforeDelete ()
 
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...
 
virtual CMessageResult notify (CBaseObject *sender, IdStringPtr message)
 

Protected Attributes

CNinePartTiledDescription offsets
 
- Protected Attributes inherited from CBitmap
CResourceDescription resourceDesc
 
BitmapVector bitmaps
 

Additional Inherited Members

- Protected Types inherited from CBitmap
typedef SharedPointer
< IPlatformBitmap > 
BitmapPointer
 
typedef std::vector
< BitmapPointer
BitmapVector
 
- Protected Member Functions inherited from CBitmap
 CBitmap ()
 

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 |
|------------------------------------------------------------------------------------------------|

Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented from CBitmap.

const CNinePartTiledDescription& getPartOffsets ( ) const
inline
virtual bool isTypeOf ( IdStringPtr  s) const
inlinevirtual

Reimplemented from CBitmap.

virtual CBaseObject* newCopy ( ) const
inlinevirtual

Reimplemented from CBitmap.

void setPartOffsets ( const CNinePartTiledDescription partOffsets)
inline

Member Data Documentation

CNinePartTiledDescription offsets
protected

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