]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/PlatWX.cpp
Added ability to switch off more components of the size page UI
[wxWidgets.git] / src / stc / PlatWX.cpp
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) {