]> git.saurik.com Git - wxWidgets.git/commitdiff
Scintilla's Point class no longer matches the structure of wxPoint, so we need to...
authorRobin Dunn <robin@alldunn.com>
Tue, 25 Sep 2012 23:53:14 +0000 (23:53 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 25 Sep 2012 23:53:14 +0000 (23:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/stc/stctest.cpp
src/stc/PlatWX.cpp

index 8db40419ef015d8be9011995e39fa520a8ed4446..ff590d1b12ae66547eaed135a50454540ffc6481 100644 (file)
@@ -330,6 +330,7 @@ AppFrame::AppFrame (const wxString &title)
     m_edit->SetFocus();
 
     FileOpen (wxT("stctest.cpp"));
+    m_edit->SetSelection(0,0);
 }
 
 AppFrame::~AppFrame () {
index 0a774a063cb915fd63fd4b0dfd8a990af7f59f01..af67c0cdaaa4dee44887d604588e0cb1f9e4eb00 100644 (file)
@@ -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; i<npts; i++) {
+        p[i].x = pts[i].x;
+        p[i].y = pts[i].y;
+    }
+    hdc->DrawPolygon(npts, p);
+    delete [] p;
 }
 
 void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) {