|
VSTGUI 4.10
Graphical User Interface Framework not only for VST plugins
|
Multi frame bitmap. More...
#include <cbitmap.h>
Inheritance diagram for CMultiFrameBitmap:Public Member Functions | |
| CMultiFrameBitmap (const CResourceDescription &desc, CMultiFrameBitmapDescription multiFrameDesc) | |
| bool | setMultiFrameDesc (CMultiFrameBitmapDescription desc) |
| set the multi frame description More... | |
| CMultiFrameBitmapDescription | getMultiFrameDesc () const |
| get the mult frame description More... | |
| CPoint | getFrameSize () const |
| get the frame size More... | |
| uint16_t | getNumFrames () const |
| get the number of frames More... | |
| uint16_t | getNumFramesPerRow () const |
| get the number of frames per row More... | |
| CRect | calcFrameRect (uint32_t frameIndex) const |
| calculate the rect for one frame More... | |
| void | drawFrame (CDrawContext *context, uint16_t frameIndex, CPoint pos) |
| draw one frame at the position in the context More... | |
| virtual uint16_t | normalizedValueToFrameIndex (float value) const |
| return the frame to display for a normalized value More... | |
| virtual float | frameIndexToNormalizedValue (uint16_t frameIndex) const |
| return the normalized value from the frame index More... | |
| CBitmap (const CResourceDescription &desc) | |
| Create an image from a resource identifier. More... | |
| CBitmap (CCoord width, CCoord height) | |
| Create an image with a given size. More... | |
| CBitmap (CPoint size, double scaleFactor=1.) | |
| Create an image with a given size and scale factor. More... | |
| CBitmap (const PlatformBitmapPtr &platformBitmap) | |
| CBitmap () | |
Public Member Functions inherited from CBitmap | |
| CBitmap (const CResourceDescription &desc) | |
| Create an image from a resource identifier. More... | |
| CBitmap (CCoord width, CCoord height) | |
| Create an image with a given size. More... | |
| CBitmap (CPoint size, double scaleFactor=1.) | |
| Create an image with a given size and scale factor. More... | |
| CBitmap (const PlatformBitmapPtr &platformBitmap) | |
| ~CBitmap () noexcept override=default | |
| virtual void | draw (CDrawContext *context, const CRect &rect, const CPoint &offset=CPoint(0, 0), float alpha=1.f) |
| CCoord | getWidth () const |
| get the width of the image More... | |
| CCoord | getHeight () const |
| get the height of the image More... | |
| CPoint | getSize () const |
| get size of image More... | |
| bool | isLoaded () const |
| check if image is loaded More... | |
| const CResourceDescription & | getResourceDescription () const |
| PlatformBitmapPtr | getPlatformBitmap () const |
| void | setPlatformBitmap (const PlatformBitmapPtr &bitmap) |
| bool | addBitmap (const PlatformBitmapPtr &platformBitmap) |
| PlatformBitmapPtr | getBestPlatformBitmapForScaleFactor (double scaleFactor) const |
| const_iterator | begin () const |
| const_iterator | end () const |
Public Member Functions inherited from ReferenceCounted< T > | |
| ReferenceCounted ()=default | |
| virtual | ~ReferenceCounted () noexcept=default |
| ReferenceCounted (const ReferenceCounted &) | |
| ReferenceCounted & | operator= (const ReferenceCounted &) |
| void | forget () override |
| decrease refcount and delete object if refcount == 0 More... | |
| void | remember () override |
| increase refcount More... | |
| virtual int32_t | getNbReference () const |
| get refcount More... | |
| virtual void | forget ()=0 |
| decrease refcount and delete object if refcount == 0 More... | |
| virtual void | remember ()=0 |
| increase refcount More... | |
Additional Inherited Members | |
Public Types inherited from CBitmap | |
| using | BitmapVector = std::vector< PlatformBitmapPtr > |
| using | const_iterator = BitmapVector::const_iterator |
Protected Member Functions inherited from CBitmap | |
| CBitmap () | |
Protected Attributes inherited from CBitmap | |
| CResourceDescription | resourceDesc |
| BitmapVector | bitmaps |
Multi frame bitmap.
A bitmap describing multiple frames ordered in rows and columns
The index order is columns and then rows:
1.Row: 1 -> 2 -> 3 2.Row: 4 -> 5 -> 6 ...
| CMultiFrameBitmap | ( | const CResourceDescription & | desc, |
| CMultiFrameBitmapDescription | multiFrameDesc | ||
| ) |
| CRect calcFrameRect | ( | uint32_t | frameIndex | ) | const |
calculate the rect for one frame
| CBitmap | ( | ) |
|
explicit |
Create an image from a resource identifier.
|
explicit |
Create an image with a given size and scale factor.
| void drawFrame | ( | CDrawContext * | context, |
| uint16_t | frameIndex, | ||
| CPoint | pos | ||
| ) |
draw one frame at the position in the context
| CPoint getFrameSize | ( | ) | const |
get the frame size
| CMultiFrameBitmapDescription getMultiFrameDesc | ( | ) | const |
get the mult frame description
| uint16_t getNumFrames | ( | ) | const |
get the number of frames
| uint16_t getNumFramesPerRow | ( | ) | const |
get the number of frames per row
| bool setMultiFrameDesc | ( | CMultiFrameBitmapDescription | desc | ) |
set the multi frame description
| desc | the multi frame description |