gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/canvas_svg.h
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot/canvas_svg.h')
-rw-r--r--agg-plot/canvas_svg.h 8
1 files changed, 5 insertions, 3 deletions
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;
};
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月16日 14:44:56 +0000

AltStyle によって変換されたページ (->オリジナル) /