changeset 1859:17b560081191

polygons
author corvid <corvid@lavabit.com>
date Sat, 22 Jan 2011 15:59:10 +0000
parents 58d86abb6b3f
children 6811278a670c
files dw/fltkviewbase.cc
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkviewbase.cc	Sat Jan 22 15:29:22 2011 +0000
+++ b/dw/fltkviewbase.cc	Sat Jan 22 15:59:10 2011 +0000
@@ -478,22 +478,23 @@
                                 core::style::Color::Shading shading,
                                 bool filled, int points[][2], int npoints)
 {
-#if 0
-PORT1.3
    if (npoints > 0) {
+      fl_color(((FltkColor*)color)->colors[shading]);
+
+      if (filled)
+         fl_begin_complex_polygon();
+      else
+         fl_begin_loop();
+
       for (int i = 0; i < npoints; i++) {
-         points[i][0] = translateCanvasXToViewX(points[i][0]);
-         points[i][1] = translateCanvasYToViewY(points[i][1]);
+         fl_vertex(translateCanvasXToViewX(points[i][0]),
+                   translateCanvasYToViewY(points[i][1]));
       }
-      setcolor(((FltkColor*)color)->colors[shading]);
-      addvertices(npoints, points);
-      closepath();
       if (filled)
-         fillpath();
+         fl_end_complex_polygon();
       else
-         strokepath();
+         fl_end_loop();
    }
-#endif
 }
 
 core::View *FltkViewBase::getClippingView (int x, int y, int width, int height)