X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fded56b375bf7a4687af1cdb182899614c1b2a8..5dacf03c57128529219145bafe9cee07d4348e85:/wxPython/src/image.i diff --git a/wxPython/src/image.i b/wxPython/src/image.i index ee6606d097..be25dd688d 100644 --- a/wxPython/src/image.i +++ b/wxPython/src/image.i @@ -317,6 +317,7 @@ public: static void AddHandler( wxImageHandler *handler ); static void InsertHandler( wxImageHandler *handler ); static bool RemoveHandler( const wxString& name ); + static wxString GetImageExtWildcard(); %addmethods { @@ -339,7 +340,7 @@ public: // Alternate constructors -%new wxImage* wxEmptyImage(int width=0, int height=0); +%new wxImage* wxEmptyImage(int width=0, int height=0, bool clear = TRUE); %new wxImage* wxImageFromMime(const wxString& name, const wxString& mimetype, int index = -1); %new wxImage* wxImageFromBitmap(const wxBitmap &bitmap); %new wxImage* wxImageFromData(int width, int height, unsigned char* data); @@ -347,11 +348,11 @@ public: %new wxImage* wxImageFromStreamMime(wxInputStream& stream, const wxString& mimetype, int index = -1 ); %{ - wxImage* wxEmptyImage(int width=0, int height=0) { - if (width == 0 && height == 0) - return new wxImage; + wxImage* wxEmptyImage(int width=0, int height=0, bool clear = TRUE) { + if (width > 0 && height > 0) + return new wxImage(width, height, clear); else - return new wxImage(width, height); + return new wxImage; } @@ -399,6 +400,7 @@ void wxInitAllImageHandlers(); #if 0 %} +// See also wxPy_ReinitStockObjects in helpers.cpp extern wxImage wxNullImage; %readwrite