author | francesco-ST <francesco.abbate@st.com> | 2010年07月27日 15:34:41 +0200 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2010年07月27日 15:34:41 +0200 |
commit | 5b7cd1356fb503390febbc21b2d535e98de7f776 (patch) | |
tree | 27a1131ef6d25892fc5aa771130a2a1144765975 /agg-plot/wtest.cpp | |
parent | 73378bdf0eddb1003fb3ad17e047da717b29a009 (diff) | |
download | gsl-shell-5b7cd1356fb503390febbc21b2d535e98de7f776.tar.gz |
-rw-r--r-- | agg-plot/wtest.cpp | 40 |
diff --git a/agg-plot/wtest.cpp b/agg-plot/wtest.cpp new file mode 100644 index 00000000..f527ae8c --- /dev/null +++ b/agg-plot/wtest.cpp @@ -0,0 +1,40 @@ + +#include "trans.h" +#include "window-trans.h" +#include "path.h" + +int +main() +{ + draw::path *p = new draw::path(); + + agg::path_storage& pc = p->get_base(); + pc.move_to(0.0, 0.0); + pc.line_to(1.0, 0.0); + pc.line_to(1.0, 1.0); + pc.line_to(0.0, 1.0); + pc.close_polygon(); + + trans::stroke *s1 = new trans::stroke(p); + s1->self().width(10.0); + s1->self().line_cap(agg::round_cap); + + window_scalable *ws1 = new window_scalable(s1); + + window::stroke *s2 = new window::stroke(ws1); + s2->self().width(1.0); + s2->self().line_cap(agg::round_cap); + + double x1, y1, x2, y2; + s2->bounding_box(&x1, &y1, &x2, &y2); + + agg::trans_affine mtx(200.0, 0.0, 0.0, 100.0, 0.0, 0.0); + s2->apply_transform(mtx); + + if (s2->dispose()) + delete s2; + + delete p; + + return 0; +} |