");
+MustHaveApp(wxBitmap);
+
class wxBitmap : public wxGDIObject
{
public:
wxBitmap(int width, int height, int depth=-1),
"Creates a new bitmap of the given size. A depth of -1 indicates the
depth of the current screen or visual. Some platforms only support 1
-for monochrome and -1 for the current colour setting.", "",
+for monochrome and -1 for the current display depth.", "",
EmptyBitmap);
DocCtorStrName(
%extend {
DocStr(wxBitmap(PyObject* listOfStrings),
"Construct a Bitmap from a list of strings formatted as XPM data.", "");
- %name(BitmapFromXPMData) wxBitmap(PyObject* listOfStrings) {
+
+ %RenameCtor(BitmapFromXPMData, wxBitmap(PyObject* listOfStrings))
+ {
char** cArray = NULL;
wxBitmap* bmp;
function for monochrome bitmaps (depth 1) in portable programs: in
this case the bits parameter should contain an XBM image. For other
bit depths, the behaviour is platform dependent.", "");
- %name(BitmapFromBits) wxBitmap(PyObject* bits, int width, int height, int depth=1 ) {
- char* buf;
- int length;
+
+ %RenameCtor(BitmapFromBits, wxBitmap(PyObject* bits, int width, int height, int depth=1 ))
+ {
+ char* buf;
+ Py_ssize_t length;
PyString_AsStringAndSize(bits, &buf, &length);
return new wxBitmap(buf, width, height, depth);
}
}
-#ifdef __WXMSW__
- void SetPalette(wxPalette& palette);
-#endif
-
// wxGDIImage methods
#ifdef __WXMSW__
long GetHandle();
be converted back and forth without loss in that respect.", "");
+
DocDeclStr(
virtual wxMask* , GetMask() const,
"Gets the associated mask (if any) which may have been loaded from a
:see: `SetMask`, `wx.Mask`
", "");
-
+ // MSW only? wxBitmap GetMaskBitmap() const;
+
+ %disownarg(wxMask*);
DocDeclStr(
virtual void , SetMask(wxMask* mask),
"Sets the mask for this bitmap.
:see: `GetMask`, `wx.Mask`
", "");
-
+ %cleardisown(wxMask*);
%extend {
DocStr(SetMaskColour,
-#if wxUSE_PALETTE
virtual wxPalette *GetPalette() const;
+#ifdef __WXMSW__
virtual void SetPalette(const wxPalette& palette);
#endif
#ifdef __WXMSW__
bool CopyFromCursor(const wxCursor& cursor);
+
+// WXWIN_COMPATIBILITY_2_4
+ #if 0
int GetQuality();
void SetQuality(int q);
+ %pythoncode { GetQuality = wx._deprecated(GetQuality) }
+ %pythoncode { SetQuality = wx._deprecated(SetQuality) }
+ #endif
#endif
%pythoncode { def __nonzero__(self): return self.Ok() }
%extend {
- bool __eq__(const wxBitmap* other) { return other ? (*self == *other) : False; }
- bool __ne__(const wxBitmap* other) { return other ? (*self != *other) : True; }
+ bool __eq__(const wxBitmap* other) { return other ? (*self == *other) : false; }
+ bool __ne__(const wxBitmap* other) { return other ? (*self != *other) : true; }
}
};
`wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
mask.", "");
+MustHaveApp(wxMask);
+
class wxMask : public wxObject {
public:
}
}
- //~wxMask();
+ ~wxMask();
};
%pythoncode { MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.") }