gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/drawables.h
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot/drawables.h')
-rw-r--r--agg-plot/drawables.h 15
1 files changed, 14 insertions, 1 deletions
diff --git a/agg-plot/drawables.h b/agg-plot/drawables.h
index 9eba5058..a1483b21 100644
--- a/agg-plot/drawables.h
+++ b/agg-plot/drawables.h
@@ -15,14 +15,17 @@
#include "agg_array.h"
#include "agg_bounding_rect.h"
+#include "utils.h"
+
namespace my {
template <class T>
class vs_proxy : public vertex_source {
T* m_source;
+ unsigned ref_count;
public:
- vs_proxy(): vertex_source(), m_source(NULL) {};
+ vs_proxy(): vertex_source(), m_source(NULL), ref_count(0) {};
void set_source(T* src) { m_source = src; };
@@ -35,6 +38,14 @@ public:
#warning should loop through all the pah_ids
agg::bounding_rect_single(*m_source, 0, x1, y1, x2, y2);
};
+
+ virtual void ref() { ref_count++; };
+ virtual unsigned unref()
+ {
+ if (ref_count > 0)
+ ref_count--;
+ return ref_count;
+ };
};
class path : public vs_proxy<agg::path_storage> {
@@ -100,6 +111,8 @@ public:
m_stroke.approximation_scale(trans_affine_max_norm(m));
};
+ virtual bool need_resize() { return false; };
+
void set_text(const char *s) { m_text.text(s); };
};
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月17日 12:59:00 +0000

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