%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 {
long DeviceToLogicalY(long y);
long DeviceToLogicalYRel(long y);
void DrawArc(long x1, long y1, long x2, long y2, long xc, long yc);
+ void DrawCircle(long x, long y, long radius);
void DrawEllipse(long x, long y, long width, long height);
void DrawEllipticArc(long x, long y, long width, long height, long start, long end);
void DrawIcon(const wxIcon& icon, long x, long y);
return wc;
}
}
- void GetSize(int* OUTPUT, int* OUTPUT); //void GetSize(long* OUTPUT, long* OUTPUT);
+ %name(GetSizeTuple)void GetSize(int* OUTPUT, int* OUTPUT);
+ wxSize GetSize();
wxColour& GetTextBackground();
void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT);
%name(GetFullTextExtent)void GetTextExtent(const wxString& string,
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);