some ifdef's - now it might compile without wxUSE_IMAGE although not tested

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-04-23 23:31:42 +00:00
parent 08399e45e7
commit 6d51f22029
2 changed files with 38 additions and 15 deletions

View File

@@ -90,9 +90,12 @@ public:
// If depth is omitted, will create a bitmap compatible with the display
wxBitmap(int width, int height, int depth = -1);
#if wxUSE_IMAGE
// Convert from wxImage:
wxBitmap(const wxImage& image, int depth = -1) { (void)CreateFromImage(image, depth); }
wxBitmap(const wxImage& image, int depth = -1)
{ (void)CreateFromImage(image, depth); }
#endif // wxUSE_IMAGE
// we must have this, otherwise icons are silently copied into bitmaps using
// the copy ctor but the resulting bitmap is invalid!
@@ -121,11 +124,13 @@ public:
virtual ~wxBitmap();
#if wxUSE_IMAGE
wxImage ConvertToImage() const;
#endif // wxUSE_IMAGE
// get the given part of bitmap
wxBitmap GetSubBitmap( const wxRect& rect ) const;
// copies the contents and mask of the given (colour) icon to the bitmap
bool CopyFromIcon(const wxIcon& icon);
@@ -191,9 +196,11 @@ protected:
// creates the bitmap from XPM data, supposed to be called from ctor
bool CreateFromXpm(const char **bits);
#if wxUSE_IMAGE
// creates the bitmap from wxImage, supposed to be called from ctor
bool CreateFromImage(const wxImage& image, int depth);
#endif // wxUSE_IMAGE
private:
#ifdef __WIN32__