From acba16a38f83d3463911dd4f49a8e42ef5e01f6e Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 15 Apr 2016 21:26:13 +0000 Subject: Pico can draw lines rectf and arcs, so the top level driver does not have to git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11621 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/unittest_lines.cxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/unittest_lines.cxx b/test/unittest_lines.cxx index fa804dace..df1de65ec 100644 --- a/test/unittest_lines.cxx +++ b/test/unittest_lines.cxx @@ -38,7 +38,8 @@ public: } void draw() { Fl_Box::draw(); - int a = x()+10, b = y()+10; fl_color(FL_BLACK); fl_rect(a, b, 100, 100); + + int i, a = x()+10, b = y()+10; fl_color(FL_BLACK); fl_rect(a, b, 100, 100); // testing fl_xyline(x, y, x1) fl_color(FL_RED); fl_point(a+10, b+10); fl_point(a+20, b+10); fl_color(FL_BLACK); fl_xyline(a+10, b+10, a+20); @@ -56,6 +57,22 @@ public: fl_point(a+60, b+90); fl_point(a+90, b+90); fl_color(FL_BLACK); fl_loop(a+60, b+60, a+90, b+60, a+90, b+90, a+60, b+90); + + a = x()+120, b = y()+10; fl_color(FL_BLACK); fl_rect(a, b, 203, 203); + a += 101; b += 101; + fl_color(0xff888800); + for (i=-80; i<=80; i+=20) fl_line(a, b, a+i, b-100); + fl_color(0xff444400); + for (i=-80; i<=80; i+=20) fl_line(a, b, a+i, b+100); + fl_color(0x88ff8800); + for (i=-80; i<=80; i+=20) fl_line(a, b, a-100, b+i); + fl_color(0x44ff4400); + for (i=-80; i<=80; i+=20) fl_line(a, b, a+100, b+i); + fl_color(0x8888ff00); + fl_line(a, b, a-100, b-100); + fl_line(a, b, a+100, b-100); + fl_line(a, b, a+100, b+100); + fl_line(a, b, a-100, b+100); } }; -- cgit v1.2.3