// Purpose: interface of wxBitmap* classes
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
If you need direct access the bitmap data instead going through
drawing to it using wxMemoryDC you need to use the wxPixelData
class (either wxNativePixelData for RGB bitmaps or wxAlphaPixelData
- for bitmaps with an additionaly alpha channel).
+ for bitmaps with an additionally alpha channel).
Note that many wxBitmap functions take a @e type parameter, which is a
value of the ::wxBitmapType enumeration.
Note that all available wxBitmapHandlers for a given wxWidgets port are
automatically loaded at startup so you won't need to use wxBitmap::AddHandler.
+ More on the difference between wxImage and wxBitmap: wxImage is just a
+ buffer of RGB bytes with an optional buffer for the alpha bytes. It is all
+ generic, platform independent and image file format independent code. It
+ includes generic code for scaling, resizing, clipping, and other manipulations
+ of the image data. OTOH, wxBitmap is intended to be a wrapper of whatever is
+ the native image format that is quickest/easiest to draw to a DC or to be the
+ target of the drawing operations performed on a wxMemoryDC. By splitting the
+ responsibilities between wxImage/wxBitmap like this then it's easier to use
+ generic code shared by all platforms and image types for generic operations and
+ platform specific code where performance or compatibility is needed.
+
@library{wxcore}
@category{gdi}
@param depth
Specifies the depth of the bitmap.
If this is omitted, then a value of 1 (monochrome bitmap) is used.
+
+ @beginWxPerlOnly
+ In wxPerl use Wx::Bitmap->newFromBits(bits, width, height, depth).
+ @endWxPerlOnly
*/
wxBitmap(const char bits[], int width, int height, int depth = 1);
/**
Creates a bitmap from XPM data.
+
+ @beginWxPerlOnly
+ In wxPerl use Wx::Bitmap->newFromXPM(data).
+ @endWxPerlOnly
*/
wxBitmap(const char* const* bits);
*/
wxSize GetSize() const;
+ /**
+ Returns disabled (dimmed) version of the bitmap.
+
+ This method is not available when <code>wxUSE_IMAGE == 0</code>.
+
+ @since 2.9.0
+ */
+ wxBitmap ConvertToDisabled(unsigned char brightness = 255) const;
+
/**
Gets the width of the bitmap in pixels.