Updates related to wxID_ANY and etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-07-03 22:54:13 +00:00
parent c731eb4710
commit 3eb221f6dd
9 changed files with 82 additions and 9 deletions

View File

@@ -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);
}