author | francesco-ST <francesco.abbate@st.com> | 2010年09月02日 13:13:16 +0200 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2010年09月02日 13:13:16 +0200 |
commit | 237996111f07eb7e52d596be9a2b2145f64b707f (patch) | |
tree | 2f63a3213fc38d9d8c9865a8ab478a7e9915009d /agg-plot/window.cpp | |
parent | c90c96810389377d6f89d6709bfdcf68ecf42e94 (diff) | |
download | gsl-shell-237996111f07eb7e52d596be9a2b2145f64b707f.tar.gz |
-rw-r--r-- | agg-plot/window.cpp | 26 |
diff --git a/agg-plot/window.cpp b/agg-plot/window.cpp index b107af10..f6c7e4b4 100644 --- a/agg-plot/window.cpp +++ b/agg-plot/window.cpp @@ -117,31 +117,31 @@ window::ref* window::ref_lookup (ref::node *p, int slot_id) return NULL; } -void window::draw_slot_by_ref(window::ref& ref, bool dirty) +void window::draw_slot_by_ref(window::ref& ref, bool update_req) { if (! ref.plot) return; + agg::rect_base<int> r; agg::trans_affine mtx(ref.matrix); this->scale(mtx); - if (dirty) + if (update_req) { - agg::rect_base<int> r = rect_of_slot_matrix(mtx); + r = rect_of_slot_matrix(mtx); m_canvas->clear_box(r); - AGG_LOCK(); - try - { - ref.plot->draw(*m_canvas, mtx); - } - catch (std::bad_alloc&) { } - AGG_UNLOCK(); - platform_support_update_region (this, r); } - else + + AGG_LOCK(); + try { ref.plot->draw(*m_canvas, mtx); - } + } + catch (std::bad_alloc&) { } + AGG_UNLOCK(); + + if (update_req) + platform_support_update_region (this, r); } void |