X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ee2116be1a8abc2cf8734bf407767c04a617990..4649b5eded522cdc6d76aae074f98a2c162fd648:/wxPython/src/gdi.i diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index ffcb6744b3..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