diff options
author | corvid <corvid@lavabit.com> | 2011-01-22 15:59:10 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2011-01-22 15:59:10 +0000 |
commit | be11b1f245a443a7fee191c63338a590d2940e89 (patch) | |
tree | 93e5c89abcd2a442d8ae06f55f2c1ac3a210836b | |
parent | 587a8e1cb99bc6569b590c015790b1275d5cdb18 (diff) |
polygons
-rw-r--r-- | dw/fltkviewbase.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc index 4c2753e2..1fa93e5a 100644 --- a/dw/fltkviewbase.cc +++ b/dw/fltkviewbase.cc @@ -478,22 +478,23 @@ void FltkViewBase::drawPolygon (core::style::Color *color, 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) |