author | Francesco Abbate <francesco.bbt@gmail.com> | 2012年01月24日 18:19:41 +0100 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2012年01月30日 21:26:02 +0100 |
commit | 336b7b2386f8021a3dc569addf2e2876b10d711b (patch) | |
tree | 9abffd4b383ce85c64352d2dd26c7df99fde8bb8 /agg-plot/canvas_svg.h | |
parent | 17a0c5fb5ebaed9a694b8f48e14eb085ffcb9ab1 (diff) | |
download | gsl-shell-336b7b2386f8021a3dc569addf2e2876b10d711b.tar.gz |
-rw-r--r-- | agg-plot/canvas_svg.h | 8 |
diff --git a/agg-plot/canvas_svg.h b/agg-plot/canvas_svg.h index 96c07b31..23d669e1 100644 --- a/agg-plot/canvas_svg.h +++ b/agg-plot/canvas_svg.h @@ -25,7 +25,8 @@ static const char *svg_end = "</svg>\n"; class canvas_svg { public: - canvas_svg(FILE *f) : m_output(f), m_current_id(0) { } + canvas_svg(FILE *f, double height): + m_output(f), m_height(height), m_current_id(0) { } void clip_box(const agg::rect_base<int>& clip) { } @@ -35,7 +36,7 @@ public: void draw(VertexSource& vs, agg::rgba8 c) { str path; - svg_coords_from_vs(&vs, path); + svg_coords_from_vs(&vs, path, m_height); str s = svg_fill_path(path, m_current_id++, c); writeln(m_output, s, " "); } @@ -44,7 +45,7 @@ public: void draw_outline(VertexSource& vs, agg::rgba8 c) { str path; - svg_coords_from_vs(&vs, path); + svg_coords_from_vs(&vs, path, m_height); str s = svg_stroke_path(path, default_stroke_width, m_current_id++, c); writeln(m_output, s, " "); } @@ -64,6 +65,7 @@ public: private: FILE *m_output; + double m_height; int m_current_id; }; |