author | Francesco Abbate <francesco.bbt@gmail.com> | 2010年09月14日 00:11:52 +0200 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2010年09月14日 00:11:52 +0200 |
commit | 5579b4915465dbbe1067b439795385ecbb589b9e (patch) | |
tree | eef1fe944bbda9b26eab0ea7d77a33d1c7de241d /agg-plot/window-cpp.h | |
parent | 58a6cc09db4235d47adc2afd0df7ea0709d8eace (diff) | |
download | gsl-shell-5579b4915465dbbe1067b439795385ecbb589b9e.tar.gz |
-rw-r--r-- | agg-plot/window-cpp.h | 14 |
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); |