|
| 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. More...
|
| |
| 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. More...
|
| |
| 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...
|
| |
| void * | getHandle () const |
| | get a platform image object. Normally you don't need this More...
|
| |
| void | setTransparentColor (const CColor color) |
| | set the color of the image which should not be drawn. Works only once on some implementations/platforms. More...
|
| |
| CColor | getTransparentColor () const |
| | get the current transparent color More...
|
| |
| void | setNoAlpha (bool state) |
| |
| bool | getNoAlpha () const |
| |
| const CResourceDescription & | getResourceDescription () const |
| |
Encapsulates various platform depended kinds of bitmaps.
Alpha Blend and Transparency
With Version 3.0 of VSTGUI it is possible to use alpha blended bitmaps. This comes free on Mac OS X and with Windows you need to include libpng. Per default PNG images will be rendered alpha blended. If you want to use a transparency color with PNG Bitmaps, you need to call setNoAlpha(true) on the bitmap and set the transparency color.
Apple Mac OS X
The Bitmaps can be of type PNG, JPEG, PICT, BMP and are stored in the Resources folder of the plugin bundle. With the latest version VSTGUI supports all image types supported by the Image I/O Framework.
Microsoft Windows
The Bitmaps are .bmp files and must be included in the plug (usually using a .rc file). It's also possible to use png as of version 3.0 if you define the macro USE_LIBPNG and include the libpng and zlib libraries/sources to your project.
New since 3.0
There is a new way to name the bitmaps in the latest version. Instead of using a number identifier for the bitmaps you can now use real names for it. The CResourceDescription works with both names and numbers. If you use names, you need to use the real filename with extension. Then it gets automaticly loaded on Mac OS X out of the Resources folder of the vst bundle. On Windows you also specify the resource in the .rc file with the real filename.
1001 BITMAP DISCARDABLE "bmp01001.bmp"
RealFileName.bmp DATA "RealFileName.bmp"
RealFileName.bmp BITMAP DISCARDABLE "RealFileName.bmp"