summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-04-15 21:26:13 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-04-15 21:26:13 +0000
commitacba16a38f83d3463911dd4f49a8e42ef5e01f6e (patch)
tree480efc179c169e94444ab88b713cf5de7e7c82c0 /test
parent95bf8ef443bf4880d6c82b45fd07cbb5d7fcbd66 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/unittest_lines.cxx19
1 files changed, 18 insertions, 1 deletions
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);
}
};