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 20
1 files changed, 19 insertions, 1 deletions
diff --git a/agg-plot/scalable.h b/agg-plot/scalable.h
index 154a8338..30ee655d 100644
--- a/agg-plot/scalable.h
+++ b/agg-plot/scalable.h
@@ -28,9 +28,27 @@ public:
virtual ~scalable() { };
};
+/* This class is basically a wrapper around a native AGG vertex_source object
+ that implements the "scalable" interface. */
+template <class T, bool system_managed>
+class vs_proxy : public scalable {
+ T m_base;
+
+public:
+ vs_proxy(): scalable(), m_base() {};
+
+ virtual void rewind(unsigned path_id) { m_base.rewind(path_id); };
+ virtual unsigned vertex(double* x, double* y) { return m_base.vertex(x, y); };
+
+ virtual void approximation_scale(double as) { };
+ virtual bool dispose() { return (system_managed ? false : true); };
+
+ T& get_base() { return m_base; };
+};
+
/* this class does work does permit to perform an AGG transformation
like conv_stroke, conv_dash or any other transform. This adapter
- is mean to preserve the scalable or the window_drawable interface. */
+ is meant to preserve the scalable or the window_drawable interface. */
template<class conv_type, class base_type>
class vs_adapter : public base_type {
protected:
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月26日 06:58:35 +0000

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