From: Robin Dunn Date: Tue, 25 Sep 2012 23:53:14 +0000 (+0000) Subject: Scintilla's Point class no longer matches the structure of wxPoint, so we need to... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/48d63da328f1c10d45a39fd08f3919e7f5ae7386 Scintilla's Point class no longer matches the structure of wxPoint, so we need to copy points to a wxPoint array instead of just typcasting Scintilla's array. Fixes #14687 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp index 8db40419ef..ff590d1b12 100644 --- a/samples/stc/stctest.cpp +++ b/samples/stc/stctest.cpp @@ -330,6 +330,7 @@ AppFrame::AppFrame (const wxString &title) m_edit->SetFocus(); FileOpen (wxT("stctest.cpp")); + m_edit->SetSelection(0,0); } AppFrame::~AppFrame () { diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 0a774a063c..af67c0cdaa 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -277,7 +277,14 @@ void SurfaceImpl::LineTo(int x_, int y_) { void SurfaceImpl::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) { PenColour(fore); BrushColour(back); - hdc->DrawPolygon(npts, (wxPoint*)pts); + wxPoint *p = new wxPoint[npts]; + + for (int i=0; iDrawPolygon(npts, p); + delete [] p; } void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) {