X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/19a97bd6f98edc899ee0c3b2f2c4fe4ee8a0082b..4649b5eded522cdc6d76aae074f98a2c162fd648:/wxPython/src/gdi.i diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index 8474a1fa01..f80dd7e1ca 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -87,8 +87,8 @@ public: #endif wxBitmap GetSubBitmap( const wxRect& rect ); -#ifdef __WXMSW__ bool CopyFromIcon(const wxIcon& icon); +#ifdef __WXMSW__ bool CopyFromCursor(const wxCursor& cursor); int GetQuality(); void SetQuality(int q); @@ -598,7 +598,6 @@ public: //---------------------------------------------------------------------- - class wxPen : public wxGDIObject { public: wxPen(wxColour& colour, int width=1, int style=wxSOLID); @@ -618,7 +617,7 @@ public: void SetWidth(int width); // **** This one needs to return a list of ints (wxDash) - int GetDashes(wxDash **dashes); + //int GetDashes(wxDash **dashes); void SetDashes(int LCOUNT, wxDash* choices); #ifdef __WXMSW__ @@ -628,6 +627,42 @@ public: }; + +%{ +class wxPyPen : public wxPen { +public: + wxPyPen(wxColour& colour, int width=1, int style=wxSOLID) + : wxPen(colour, width, style) + { m_dash = NULL; } + ~wxPyPen() { + if (m_dash) + delete m_dash; + } + + void SetDashes(int nb_dashes, const wxDash *dash) { + m_dash = new wxDash[nb_dashes]; + for (int i=0; i