X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a651eb856b521149d67a76aaa1a704df5eacb4d..bf44306ebca5d26e204ef17851516d844bc2f0a7:/wxPython/src/image.i?ds=sidebyside diff --git a/wxPython/src/image.i b/wxPython/src/image.i index 04d1bb5d62..37757eeb54 100644 --- a/wxPython/src/image.i +++ b/wxPython/src/image.i @@ -30,7 +30,7 @@ //--------------------------------------------------------------------------- -class wxImageHandler { +class wxImageHandler : public wxObject { public: // wxImageHandler(); Abstract Base Class wxString GetName(); @@ -90,12 +90,15 @@ public: //--------------------------------------------------------------------------- -class wxImage { +class wxImage : public wxObject { public: wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY ); ~wxImage(); wxBitmap ConvertToBitmap(); +#ifdef __WXGTK__ + wxBitmap ConvertToMonoBitmap( unsigned char red, unsigned char green, unsigned char blue ) const; +#endif void Create( int width, int height ); void Destroy(); wxImage Scale( int width, int height ); @@ -169,6 +172,7 @@ public: static bool RemoveHandler( const wxString& name ); }; + // Alternate constructors %new wxImage* wxEmptyImage(int width=0, int height=0); %new wxImage* wxImageFromMime(const wxString& name, const wxString& mimetype); @@ -208,4 +212,16 @@ extern wxImage wxNullImage; //--------------------------------------------------------------------------- +// This one is here to avoid circular imports + +%new wxBitmap* wxBitmapFromImage(const wxImage& img, int depth=-1); + +%{ + wxBitmap* wxBitmapFromImage(const wxImage& img, int depth=-1) { + return new wxBitmap(img, depth); + } + +%} + + //---------------------------------------------------------------------------