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

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)
 
virtual bool isTypeOf (IdStringPtr s) const
 
virtual CBaseObjectnewCopy () const
 
Part Offsets
void setPartOffsets (const PartOffsets &partOffsets)
 
const PartOffsetsgetPartOffsets () 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)
 
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

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

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

void drawPart ( CDrawContext inContext,
const CRect inSourceRect,
const CRect inDestRect,
float  inAlpha = 1.f 
)
protectedvirtual

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void drawParts ( CDrawContext pContext,
const CRect rect,
float  alpha = 1.f 
)
protectedvirtual

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void forget ( )
inlinevirtualinherited

decrease refcount and delete object if refcount == 0

CCoord getHeight ( ) const
inherited

get the height of the image

+ Here is the caller graph for this function:

virtual int32_t getNbReference ( ) const
inlinevirtualinherited

get refcount

const PartOffsets& getPartOffsets ( ) const
inline
IPlatformBitmap* getPlatformBitmap ( ) const
inlineinherited

+ 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 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 PartOffsets partOffsets)
inline
void setPlatformBitmap ( IPlatformBitmap *  bitmap)
inherited

+ Here is the caller graph for this function:

Member Data Documentation

PartOffsets offsets
protected
IPlatformBitmap* platformBitmap
protectedinherited
CResourceDescription resourceDesc
protectedinherited

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