gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/drawable.h
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot/drawable.h')
-rw-r--r--agg-plot/drawable.h 21
1 files changed, 21 insertions, 0 deletions
diff --git a/agg-plot/drawable.h b/agg-plot/drawable.h
index a8b4abb9..67304ba1 100644
--- a/agg-plot/drawable.h
+++ b/agg-plot/drawable.h
@@ -54,4 +54,25 @@ public:
virtual bool dispose();
};
+template<class conv_type>
+class drawable_adapter : public vs_adapter<conv_type, drawable> {
+ typedef vs_adapter<conv_type, drawable> root_type;
+
+public:
+ drawable_adapter(drawable *src) : root_type(src) { };
+
+ template <class init_type>
+ drawable_adapter(scalable* src, init_type& val): root_type(src, val) {};
+
+ virtual void apply_transform(const agg::trans_affine& m)
+ {
+ this->m_source->apply_transform(m);
+ };
+
+ virtual void bounding_box(double *x1, double *y1, double *x2, double *y2)
+ {
+ this->m_source->bounding_box(x1, y1, x2, y2);
+ }
+};
+
#endif
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月20日 03:41:57 +0000

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