author | francesco-ST <francesco.abbate@st.com> | 2010年08月27日 14:54:35 +0200 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2010年08月27日 14:54:35 +0200 |
commit | 32cb1ed9940cbfb02fc1fc73ef2e73a2b30e516b (patch) | |
tree | d123ecf899e54fc9b50e0e64e21a05a62052e572 /agg-plot | |
parent | 066287cc4f5d8a6e3a64e9ff53738585dfd72a86 (diff) | |
download | gsl-shell-32cb1ed9940cbfb02fc1fc73ef2e73a2b30e516b.tar.gz |
-rw-r--r-- | agg-plot/test.cpp | 36 | ||||
-rw-r--r-- | agg-plot/wtest.cpp | 55 |
diff --git a/agg-plot/test.cpp b/agg-plot/test.cpp deleted file mode 100644 index 68cbb26d..00000000 --- a/agg-plot/test.cpp +++ /dev/null @@ -1,36 +0,0 @@ - -#include "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); - - trans::dash *d1 = new trans::dash(p); - d1->self().add_dash(7.0, 3.0); - - trans::stroke *s2 = new trans::stroke(s1); - s1->self().width(1.0); - - if (s2->dispose()) - delete s2; - - if (d1->dispose()) - delete d1; - - delete p; - - return 0; -} diff --git a/agg-plot/wtest.cpp b/agg-plot/wtest.cpp deleted file mode 100644 index 2631b625..00000000 --- a/agg-plot/wtest.cpp +++ /dev/null @@ -1,55 +0,0 @@ - -#include "trans.h" -#include "path.h" -#include "text.h" - -int -main() -{ - draw::path *p = new draw::path(); - - agg::path_storage& pc = p->self(); - pc.move_to(0.0, 0.0); - pc.line_to(20.0, 0.0); - pc.line_to(20.0, 20.0); - pc.line_to(0.0, 20.0); - pc.close_polygon(); - - trans<scalable_context>::stroke *s1 = new trans<scalable_context>::stroke(p); - s1->self().width(4.0); - s1->self().line_cap(agg::round_cap); - - double c = 0.707, s= 0.707; - agg::trans_affine rmat(c, s, -s, c, 0.0, 0.0); - trans<scalable_context>::affine *rs1 = new trans<scalable_context>::affine(s1, rmat); - - window_scalable *ws1 = new window_scalable(rs1); - - trans<drawable_context>::stroke *s2 = new trans<drawable_context>::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); - - draw::text *txt = new draw::text(12.0); - txt->self().text("Hello world!"); - txt->self().start_point(4.0, 5.0); - - trans<drawable_context>::dash *d2 = new trans<drawable_context>::dash(txt); - d2->self().add_dash(2.0, 2.0); - - if (s2->dispose()) - delete s2; - - if (d2->dispose()) - delete d2; - - delete txt; - delete p; - - return 0; -} |