author | Francesco Abbate <francesco.bbt@gmail.com> | 2010年09月08日 16:38:52 +0200 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2010年09月08日 16:38:52 +0200 |
commit | e34ad362e880d7e2e1b6e367b6949eab4cba11d1 (patch) | |
tree | d2db31dba071e0ddad65b99db2d8ecf623fc73ef /agg-plot/plot-auto.h | |
parent | d50cced431bcf32ded6a58a8ffad6e642b7d410b (diff) | |
download | gsl-shell-e34ad362e880d7e2e1b6e367b6949eab4cba11d1.tar.gz |
-rw-r--r-- | agg-plot/plot-auto.h | 10 |
diff --git a/agg-plot/plot-auto.h b/agg-plot/plot-auto.h index e93216f2..2d11bee6 100644 --- a/agg-plot/plot-auto.h +++ b/agg-plot/plot-auto.h @@ -28,8 +28,9 @@ template<class VertexSource, class resource_manager = no_management> class plot_auto : public plot<VertexSource, resource_manager> { -public: + typedef plot_item<VertexSource> item; +public: plot_auto() : plot<VertexSource, resource_manager>(true), m_bbox_updated(true), m_is_empty(true) @@ -53,8 +54,7 @@ private: template <class VS, class RM> void plot_auto<VS,RM>::add(VS* vs, agg::rgba8 *color, bool outline) { - typedef typename plot_auto<VS,RM>::container cnt_type; - cnt_type d(vs, color, outline); + item d(vs, color, outline); if (!this->fit_inside(vs)) { @@ -64,7 +64,7 @@ void plot_auto<VS,RM>::add(VS* vs, agg::rgba8 *color, bool outline) } else { - this->m_drawing_queue = new pod_list<cnt_type>(d, this->m_drawing_queue); + this->m_drawing_queue = new pod_list<item>(d, this->m_drawing_queue); } this->m_is_empty = false; @@ -93,7 +93,7 @@ void plot_auto<VS,RM>::calc_bounding_box() { for (unsigned j = 0; j < this->m_elements.size(); j++) { - typename plot_auto<VS,RM>::container& d = this->m_elements[j]; + item& d = this->m_elements[j]; agg::rect_base<double> r; d.vs->bounding_box(&r.x1, &r.y1, &r.x2, &r.y2); |