gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/plot.h
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年11月01日 15:46:41 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年11月01日 15:46:41 +0100
commit2eb370ffbec7d188e7ca18d24bcc39d7a2e41ba3 (patch)
tree855a069341bcbdf6753c71969f2f492e1570306c /agg-plot/plot.h
parentbd3fa1b3747591bfa315124d16398162be30c785 (diff)
downloadgsl-shell-2eb370ffbec7d188e7ca18d24bcc39d7a2e41ba3.tar.gz
Better factorization of drawing code in FOX client
Diffstat (limited to 'agg-plot/plot.h')
-rw-r--r--agg-plot/plot.h 15
1 files changed, 15 insertions, 0 deletions
diff --git a/agg-plot/plot.h b/agg-plot/plot.h
index 0ab76a89..06d0d35a 100644
--- a/agg-plot/plot.h
+++ b/agg-plot/plot.h
@@ -466,6 +466,11 @@ protected:
bool m_need_redraw;
opt_rect<double> m_rect;
+ // keep trace of the region where changes happened since
+ // the last pushlayer or clear
+ opt_rect<double> m_changes_accu;
+ opt_rect<double> m_changes_pending;
+
bool m_use_units;
units m_ux, m_uy;
@@ -505,6 +510,7 @@ void plot<RM>::commit_pending_draw()
{
push_drawing_queue();
m_need_redraw = false;
+ m_changes_pending.clear();
}
template <class RM>
@@ -642,6 +648,13 @@ template <class Canvas> void plot<RM>::draw_queue(Canvas& _canvas, const agg::tr
bb.add<rect_union>(ebb);
}
+ m_changes_accu.add<rect_union>(bb);
+
+ if (m_changes_pending.is_defined())
+ {
+ bb.add<rect_union>(m_changes_pending);
+ }
+
canvas.reset_clipping();
}
@@ -1114,6 +1127,8 @@ void plot<RM>::clear_current_layer()
clear_drawing_queue();
layer_dispose_elements(current);
current->clear();
+ m_changes_pending = m_changes_accu;
+ m_changes_accu.clear();
}
template <class RM>
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月13日 18:19:39 +0000

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