author | Francesco Abbate <francesco.bbt@gmail.com> | 2010年09月20日 01:23:45 +0200 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2010年09月20日 01:23:45 +0200 |
commit | 0733e9943a6041324938ec9d112387c715cca7ac (patch) | |
tree | 99db12a4c7801d4b525e04a48bccaaeaa148c2fd /agg-plot/rect.h | |
parent | a648800282d2bd763fbf6a182a1673b1f7ac4596 (diff) | |
download | gsl-shell-0733e9943a6041324938ec9d112387c715cca7ac.tar.gz |
-rw-r--r-- | agg-plot/rect.h | 12 |
diff --git a/agg-plot/rect.h b/agg-plot/rect.h index d9e09099..82e761f5 100644 --- a/agg-plot/rect.h +++ b/agg-plot/rect.h @@ -25,7 +25,7 @@ public: { assert (m_defined); return m_rect; - }; + } void compose(rect_type& dst, const rect_type& r) { @@ -33,13 +33,19 @@ public: dst = (m_defined ? agg::unite_rectangles(m_rect, r) : r); else dst = (m_defined ? agg::intersect_rectangles(m_rect, r) : r); - }; + } void add(const rect_type& r) { this->compose(m_rect, r); m_defined = true; - }; + } + + void add(const opt_rect& optr) + { + if (optr.m_defined) + this->add(optr.m_rect); + } }; #endif |