X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba938c3d005ad1ecab95b95c5f64e428067bc75e..015fd9ef4833ec3d8b0043a1c7e448c8be4f734a:/wxPython/src/_image.i diff --git a/wxPython/src/_image.i b/wxPython/src/_image.i index f5d4b36bd3..d248f1a0fa 100644 --- a/wxPython/src/_image.i +++ b/wxPython/src/_image.i @@ -52,7 +52,7 @@ class wxImageHistogram /* : public wxImageHistogramBase */ public: wxImageHistogram(); - DocStr(MakeKey, "Get the key in the histogram for the given RGB values"); + DocStr(MakeKey, "Get the key in the histogram for the given RGB values", ""); static unsigned long MakeKey(unsigned char r, unsigned char g, unsigned char b); @@ -65,9 +65,9 @@ public: unsigned char startG = 0, unsigned char startB = 0 ) const, "FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)", - "Find first colour that is not used in the image and has higher RGB values than\n" - "startR, startG, startB. Returns a tuple consisting of a success flag and rgb\n" - "values."); + "Find first colour that is not used in the image and has higher RGB +values than startR, startG, startB. Returns a tuple consisting of a +success flag and rgb values.", ""); }; @@ -83,24 +83,15 @@ public: %name(ImageFromMime) wxImage(const wxString& name, const wxString& mimetype, int index = -1); %name(ImageFromStream) wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1); %name(ImageFromStreamMime) wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 ); - - - %extend { - - %nokwargs wxImage(int width=0, int height=0, bool clear = True); - %nokwargs wxImage(const wxSize& size, bool clear = True); %name(EmptyImage) wxImage(int width=0, int height=0, bool clear = True) { if (width > 0 && height > 0) return new wxImage(width, height, clear); else return new wxImage; } - %name(EmptyImage) wxImage(const wxSize& size, bool clear = True) { - return new wxImage(size.x, size.y, clear); - } - + MustHaveApp(wxImage(const wxBitmap &bitmap)); %name(ImageFromBitmap) wxImage(const wxBitmap &bitmap) { return new wxImage(bitmap.ConvertToImage()); } @@ -139,9 +130,9 @@ public: bool, FindFirstUnusedColour( byte *OUTPUT, byte *OUTPUT, byte *OUTPUT, byte startR = 0, byte startG = 0, byte startB = 0 ) const, "FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)", - "Find first colour that is not used in the image and has higher RGB values than\n" - "startR, startG, startB. Returns a tuple consisting of a success flag and rgb\n" - "values."); + "Find first colour that is not used in the image and has higher RGB +values than startR, startG, startB. Returns a tuple consisting of a +success flag and rgb values.", ""); // Set image's mask to the area of 'mask' that has colour @@ -322,6 +313,9 @@ public: static wxString GetImageExtWildcard(); +MustHaveApp(ConvertToBitmap); +MustHaveApp(ConvertToMonoBitmap); + %extend { wxBitmap ConvertToBitmap() { wxBitmap bitmap(*self); @@ -342,7 +336,17 @@ public: -void wxInitAllImageHandlers(); +///void wxInitAllImageHandlers(); + +%pythoncode { + def InitAllImageHandlers(): + """ + The former functionality of InitAllImageHanders is now done internal to + the _core_ extension module and so this function has become a simple NOP. + """ + pass +} + // See also wxPy_ReinitStockObjects in helpers.cpp