author | Francesco Abbate <francesco.bbt@gmail.com> | 2012年11月01日 15:46:41 +0100 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2012年11月01日 15:46:41 +0100 |
commit | 2eb370ffbec7d188e7ca18d24bcc39d7a2e41ba3 (patch) | |
tree | 855a069341bcbdf6753c71969f2f492e1570306c /agg-plot/rect.h | |
parent | bd3fa1b3747591bfa315124d16398162be30c785 (diff) | |
download | gsl-shell-2eb370ffbec7d188e7ca18d24bcc39d7a2e41ba3.tar.gz |
-rw-r--r-- | agg-plot/rect.h | 16 |
diff --git a/agg-plot/rect.h b/agg-plot/rect.h index 3205da6c..d768d0dd 100644 --- a/agg-plot/rect.h +++ b/agg-plot/rect.h @@ -20,10 +20,20 @@ public: void clear() { m_defined = false; }; + void set(const rect_type& r) { m_defined = true; m_rect = r; }; + + void set(T x1, T y1, T x2, T y2) { + m_defined = true; + m_rect.x1 = x1; + m_rect.y1 = y1; + m_rect.x2 = x2; + m_rect.y2 = y2; + }; + bool is_defined() const { return m_defined; }; @@ -41,6 +51,12 @@ public: m_rect = src.m_rect; } + void operator = (const rect_type& src) + { + m_defined = true; + m_rect = src; + } + template <set_oper_e op> void add(const rect_type& r) { |