added buffered image for faster animation redraw based on layers - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/window-cpp.h
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2010年09月14日 00:11:52 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2010年09月14日 00:11:52 +0200
commit5579b4915465dbbe1067b439795385ecbb589b9e (patch)
treeeef1fe944bbda9b26eab0ea7d77a33d1c7de241d /agg-plot/window-cpp.h
parent58a6cc09db4235d47adc2afd0df7ea0709d8eace (diff)
downloadgsl-shell-5579b4915465dbbe1067b439795385ecbb589b9e.tar.gz
added buffered image for faster animation redraw based on layers
It works now! Just some code clean up, rationalisation and more testing.
Diffstat (limited to 'agg-plot/window-cpp.h')
-rw-r--r--agg-plot/window-cpp.h 14
1 files changed, 11 insertions, 3 deletions
diff --git a/agg-plot/window-cpp.h b/agg-plot/window-cpp.h
index 99db9163..42abcfc3 100644
--- a/agg-plot/window-cpp.h
+++ b/agg-plot/window-cpp.h
@@ -30,8 +30,13 @@ public:
bmatrix matrix;
- ref() : plot(0), matrix() {};
- ref(plot_type *p) : plot(p), matrix() {};
+ unsigned char *layer_buf;
+ agg::rendering_buffer layer_img;
+
+ ref() : plot(0), matrix(), layer_buf(0) {};
+ ref(plot_type *p) : plot(p), matrix(), layer_buf(0) {};
+
+ ~ref() { if (layer_buf) delete layer_buf; };
static void compose(bmatrix& a, const bmatrix& b);
static int calculate(node *t, const bmatrix& m, int id);
@@ -46,7 +51,7 @@ private:
static ref *ref_lookup (ref::node *p, int slot_id);
ref::node* m_tree;
-
+
public:
window(agg::rgba& bgcol) : canvas_window(bgcol), m_tree(0)
{
@@ -60,6 +65,9 @@ public:
void draw_slot(int slot_id, bool update_req);
void refresh_slot(int slot_id);
+ void save_slot_image(int slot_id);
+ void restore_slot_image(int slot_id);
+
void cleanup_refs(lua_State *L, int window_index)
{
cleanup_tree_rec (L, window_index, m_tree);
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月14日 14:32:14 +0000

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