X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bb6da4ae69b4b16982a1cf7a7284c44b98e4e21..abb69c6c82d61cf18f14270650a68896a3d8ed47:/include/wx/os2/bitmap.h diff --git a/include/wx/os2/bitmap.h b/include/wx/os2/bitmap.h index baacd60aa8..ba920a1fac 100644 --- a/include/wx/os2/bitmap.h +++ b/include/wx/os2/bitmap.h @@ -29,6 +29,7 @@ class WXDLLEXPORT wxIcon; class WXDLLEXPORT wxMask; class WXDLLEXPORT wxCursor; class WXDLLEXPORT wxControl; +class WXDLLEXPORT wxImage; // ---------------------------------------------------------------------------- // Bitmap data @@ -105,6 +106,9 @@ public: ,int nDepth = -1 ); + wxBitmap( const wxImage& image, int depth = -1 ) + { (void)CreateFromImage(image, depth); } + // we must have this, otherwise icons are silently copied into bitmaps using // the copy ctor but the resulting bitmap is invalid! inline wxBitmap(const wxIcon& rIcon) @@ -132,6 +136,8 @@ public: virtual ~wxBitmap(); + wxImage ConvertToImage() const; + // get the given part of bitmap wxBitmap GetSubBitmap(const wxRect& rRect) const; @@ -226,6 +232,7 @@ protected: // creates the bitmap from XPM data, supposed to be called from ctor bool CreateFromXpm(const char **bits); + bool CreateFromImage(const wxImage& image, int depth); private: bool CopyFromIconOrCursor(const wxGDIImage& rIcon);