diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2010-01-09 00:11:35 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2010-01-09 00:11:35 +0000 |
commit | da9f17aa78b7b41424a546a2cf8b2a785f9a030f (patch) | |
tree | 6d82a9d79ee3618023940ef3052c6e4fc13911eb /test/plottest.c | |
parent | fd3c7753435658a6aeebf1b68d18178a6c7cf57d (diff) | |
download | libnsfb-da9f17aa78b7b41424a546a2cf8b2a785f9a030f.tar.gz libnsfb-da9f17aa78b7b41424a546a2cf8b2a785f9a030f.tar.bz2 |
strip legacy plotter interface
cleanup line plotting interface
move plotter interface structs to apropriate header
svn path=/trunk/libnsfb/; revision=9798
Diffstat (limited to 'test/plottest.c')
-rw-r--r-- | test/plottest.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/test/plottest.c b/test/plottest.c index 3fc4d83..8be921e 100644 --- a/test/plottest.c +++ b/test/plottest.c @@ -78,6 +78,7 @@ int main(int argc, char **argv) int fbstride; int p[] = { 300,300, 350,350, 400,300, 450,250, 400,200}; int loop; + nsfb_plot_pen_t pen; UNUSED(argc); UNUSED(argv); @@ -109,36 +110,40 @@ int main(int argc, char **argv) nsfb_plot_clg(nsfb, 0xffffff00 | loop); } - /* draw radial lines from the origin */ + /* draw black radial lines from the origin */ + pen.stroke_colour = 0xff000000; for (loop = 0; loop < box.x1; loop += 20) { box2 = box; box2.x1 = loop; - nsfb_plot_line(nsfb, &box2, 1, 0xff000000, false, false); + nsfb_plot_line(nsfb, &box2, &pen); } - /* draw radial lines from the bottom right */ + /* draw blue radial lines from the bottom right */ + pen.stroke_colour = 0xffff0000; for (loop = 0; loop < box.x1; loop += 20) { box2 = box; box2.x0 = loop; - nsfb_plot_line(nsfb, &box2, 1, 0xffff0000, false, false); + nsfb_plot_line(nsfb, &box2, &pen); } - /* draw radial lines from the bottom left */ + /* draw green radial lines from the bottom left */ + pen.stroke_colour = 0xff00ff00; for (loop = 0; loop < box.x1; loop += 20) { box2.x0 = box.x0; box2.x1 = loop; box2.y0 = box.y1; box2.y1 = box.y0; - nsfb_plot_line(nsfb, &box2, 1, 0xff00ff00, false, false); + nsfb_plot_line(nsfb, &box2, &pen); } - /* draw radial lines from the top right */ + /* draw red radial lines from the top right */ + pen.stroke_colour = 0xff0000ff; for (loop = 0; loop < box.x1; loop += 20) { box2.x0 = box.x1; box2.x1 = loop; box2.y0 = box.y0; box2.y1 = box.y1; - nsfb_plot_line(nsfb, &box2, 1, 0xff0000ff, false, false); + nsfb_plot_line(nsfb, &box2, &pen); } /* draw an unclipped rectangle */ |