gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/draw_svg.h
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot/draw_svg.h')
-rw-r--r--agg-plot/draw_svg.h 56
1 files changed, 28 insertions, 28 deletions
diff --git a/agg-plot/draw_svg.h b/agg-plot/draw_svg.h
index ba61f86e..34f6f681 100644
--- a/agg-plot/draw_svg.h
+++ b/agg-plot/draw_svg.h
@@ -48,18 +48,18 @@ void svg_coords_from_vs(VertexSource* vs, str& s, double h)
while ((cmd = vertex_flip(vs, &x, &y, h)))
{
if (agg::is_move_to(cmd)) {
- s.printf_add("%sM %g,%g", sep, x, y);
+ s.printf_add("%sM %g,%g", sep, x, y);
} else if (agg::is_line_to(cmd)) {
- s.printf_add("%s%g,%g", sep, x, y);
- } else if (agg::is_close(cmd)) {
- s.printf_add("%sz", sep);
- } else if (agg::is_curve3(cmd)) {
- vertex_flip(vs, &x, &y, h);
- s.printf_add("%s%g,%g", sep, x, y);
- } else if (agg::is_curve4(cmd)) {
- vs->vertex(&x, &y);
- vertex_flip(vs, &x, &y, h);
- s.printf_add("%s%g,%g", sep, x, y);
+ s.printf_add("%s%g,%g", sep, x, y);
+ } else if (agg::is_close(cmd)) {
+ s.printf_add("%sz", sep);
+ } else if (agg::is_curve3(cmd)) {
+ vertex_flip(vs, &x, &y, h);
+ s.printf_add("%s%g,%g", sep, x, y);
+ } else if (agg::is_curve4(cmd)) {
+ vs->vertex(&x, &y);
+ vertex_flip(vs, &x, &y, h);
+ s.printf_add("%s%g,%g", sep, x, y);
}
sep = space;
}
@@ -79,24 +79,24 @@ void svg_curve_coords_from_vs(VertexSource* vs, str& s, double h)
while ((cmd = vertex_flip(vs, &x, &y, h)))
{
if (agg::is_move_to(cmd)) {
- s.printf_add("%sM %g,%g", sep, x, y);
- omit_line_to = true;
+ s.printf_add("%sM %g,%g", sep, x, y);
+ omit_line_to = true;
} else if (agg::is_line_to(cmd)) {
- s.printf_add("%s%s%g,%g", sep, omit_line_to ? "" : "L ", x, y);
- } else if (agg::is_curve4(cmd)) {
- double x1 = x, y1 = y;
- double x2, y2;
- vertex_flip(vs, &x2, &y2, h);
- vertex_flip(vs, &x, &y, h);
- s.printf_add("%sC %g,%g %g,%g %g,%g", sep, x1, y1, x2, y2, x, y);
- omit_line_to = false;
- } else if (agg::is_curve3(cmd)) {
- double x1 = x, y1 = y;
- vertex_flip(vs, &x, &y, h);
- s.printf_add("%sQ %g,%g %g,%g", sep, x1, y1, x, y);
- omit_line_to = false;
- } else if (agg::is_close(cmd)) {
- s.printf_add("%sz", sep);
+ s.printf_add("%s%s%g,%g", sep, omit_line_to ? "" : "L ", x, y);
+ } else if (agg::is_curve4(cmd)) {
+ double x1 = x, y1 = y;
+ double x2, y2;
+ vertex_flip(vs, &x2, &y2, h);
+ vertex_flip(vs, &x, &y, h);
+ s.printf_add("%sC %g,%g %g,%g %g,%g", sep, x1, y1, x2, y2, x, y);
+ omit_line_to = false;
+ } else if (agg::is_curve3(cmd)) {
+ double x1 = x, y1 = y;
+ vertex_flip(vs, &x, &y, h);
+ s.printf_add("%sQ %g,%g %g,%g", sep, x1, y1, x, y);
+ omit_line_to = false;
+ } else if (agg::is_close(cmd)) {
+ s.printf_add("%sz", sep);
}
sep = space;
}
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月21日 02:38:15 +0000

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