%new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1);
wxBitmap* wxNoRefBitmap(char* name, long flags);
+#ifdef __WXMSW__
+%new wxBitmap* wxBitmapFromData(char* data, long type,
+ int width, int height, int depth = 1);
+#endif
+
%{ // Alternate 'constructor'
wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) {
return new wxBitmap(width, height, depth);
wxBitmap* wxNoRefBitmap(char* name, long flags) {
return new wxBitmap(name, flags);
}
+
+#ifdef __WXMSW__
+ wxBitmap* wxBitmapFromData(char* data, long type,
+ int width, int height, int depth = 1) {
+ return new wxBitmap((void*)data, type, width, height, depth);
+ }
+#endif
%}
//---------------------------------------------------------------------------
class wxIcon : public wxBitmap {
public:
-#ifdef __WXMSW__
wxIcon(const wxString& name, long flags,
int desiredWidth = -1, int desiredHeight = -1);
-#endif
~wxIcon();
int GetDepth();
void SetWidth(int width);
};
+
//---------------------------------------------------------------------------
class wxCursor : public wxBitmap {
void DrawBitmap(wxBitmap& bitmap, long x, long y, bool swapPalette=TRUE) {
wxMemoryDC* memDC = new wxMemoryDC;
memDC->SelectObject(bitmap);
+#ifdef __WXMSW__
if (swapPalette)
self->SetPalette(*bitmap.GetPalette());
+#endif
self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC,
0, 0, self->GetLogicalFunction());
memDC->SelectObject(wxNullBitmap);