gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/scalable.h
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot/scalable.h')
-rw-r--r--agg-plot/scalable.h 24
1 files changed, 23 insertions, 1 deletions
diff --git a/agg-plot/scalable.h b/agg-plot/scalable.h
index 745323da..29002645 100644
--- a/agg-plot/scalable.h
+++ b/agg-plot/scalable.h
@@ -22,12 +22,34 @@
#define AGGPLOT_SCALABLE_H
#include "agg_trans_affine.h"
+#include "draw_svg.h"
+#include "strpp.h"
+
+struct svg_vs {
-struct vertex_source {
virtual void rewind(unsigned path_id) = 0;
virtual unsigned vertex(double* x, double* y) = 0;
+
+ virtual str write_svg(int id, agg::rgba8 c) {
+ str path;
+ svg_property_list* ls = this->svg_path(path);
+ str s = svg_fill_path(path, id, c, ls);
+ list::free(ls);
+ return s;
+ }
+
+ virtual svg_property_list* svg_path(str& s) {
+ svg_coords_from_vs(this, s);
+ return 0;
+ }
+
+ virtual ~svg_vs() { }
+};
+
+struct vertex_source : public svg_vs {
virtual void apply_transform(const agg::trans_affine& m, double as) = 0;
virtual bool affine_compose(agg::trans_affine& m) { return false; };
+
virtual ~vertex_source() { };
};
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月16日 06:12:37 +0000

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