X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/756ed80cb873d13303abf7c5e5b3e95db57de12d..de505a9e23cfaa4ada2bf972290f7d15a9424270:/wxPython/src/gdi.i diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index fa57df3de3..0aeb10e711 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -110,7 +110,7 @@ public: %new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1); %new wxBitmap* wxBitmapFromXPMData(PyObject* listOfStrings); %new wxBitmap* wxBitmapFromIcon(const wxIcon& icon); -%new wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 ); +%new wxBitmap* wxBitmapFromBits(PyObject* bits, int width, int height, int depth = 1 ); // #ifdef __WXMSW__ // %new wxBitmap* wxBitmapFromData(PyObject* data, long type, @@ -162,8 +162,11 @@ public: } - wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 ) { - return new wxBitmap(bits, width, height, depth); + wxBitmap* wxBitmapFromBits(PyObject* bits, int width, int height, int depth = 1 ) { + char* buf; + int length; + PyString_AsStringAndSize(bits, &buf, &length); + return new wxBitmap(buf, width, height, depth); } @@ -583,6 +586,7 @@ public: int fill_style=wxODDEVEN_RULE); void DrawPoint(long x, long y); void DrawRectangle(long x, long y, long width, long height); + %name(DrawRectangleRect)void DrawRectangle(const wxRect& rect); void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle); void DrawRoundedRectangle(long x, long y, long width, long height, long radius=20); void DrawSpline(int PCOUNT, wxPoint* points); @@ -634,6 +638,7 @@ public: void SetBackgroundMode(int mode); void SetClippingRegion(long x, long y, long width, long height); %name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region); + %name(SetClippingRect) void SetClippingRegion(const wxRect& rect); void SetPalette(const wxPalette& colourMap); void SetBrush(const wxBrush& brush); void SetFont(const wxFont& font);