Public Member Functions | |
Bitmap (const SmartUtil::tstring &filePath) | |
RAII Constructor loading a bitmap from a file on disc. | |
Bitmap (unsigned resourceId) | |
RAII Constructor loading a bitmap from a resource ID. | |
Bitmap (HBITMAP bitmap) | |
RAII Constructor taking a HBITMAP. | |
HBITMAP | getBitmap () const |
Getter for the underlaying HBITMAP. | |
Point | getBitmapSize () const |
Returns the Bitmaps size. | |
BitmapPtr | resize (const Point &newSize) const |
Resize the given Bitmap. | |
~Bitmap () | |
Frees the contained HBITMAP. | |
Static Public Member Functions | |
static Point | getBitmapSize (HBITMAP Bitmap) |
Returns the given HBITMAP size. |
Use this class if you need RAII semantics encapsulating an HBITMAP
Bitmap | ( | HBITMAP | bitmap | ) | [explicit] |
RAII Constructor taking a HBITMAP.
Note!
Class takes "control" of HBITMAP meaning it will automatically free the contained HBITMAP upon destruction
Bitmap | ( | unsigned | resourceId | ) | [explicit] |
RAII Constructor loading a bitmap from a resource ID.
Note!
Class takes "control" of HBITMAP meaning it will automatically free the contained HBITMAP upon destruction
Bitmap | ( | const SmartUtil::tstring & | filePath | ) | [explicit] |
RAII Constructor loading a bitmap from a file on disc.
Note!
Class takes "control" of HBITMAP meaning it will automatically free the contained HBITMAP upon destruction
Note!
The Pocket PC (SmartPhone, WindowsMobile, Windows CE) version of this function support loading of several different types of images:
~Bitmap | ( | ) |
Frees the contained HBITMAP.
Frees the contained HBITMAP meaning it will no longer be accessible or it will be destroyed
HBITMAP getBitmap | ( | ) | const |
Getter for the underlaying HBITMAP.
Use when you need to access the underlaying HBITMAP
Point getBitmapSize | ( | HBITMAP | Bitmap | ) | [static] |
Returns the given HBITMAP size.
Returns the size (width = x, height = y) in pixels of the HBITMAP
Point getBitmapSize | ( | ) | const |
Returns the Bitmaps size.
Returns the size (width = x, height = y) in pixels of the Bitmap