author | Francesco Abbate <francesco.bbt@gmail.com> | 2012年08月08日 21:40:59 +0200 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2012年08月08日 21:40:59 +0200 |
commit | 37791df9f7ab54333c95894df33114e4d5a02310 (patch) | |
tree | bdfc385debcf258de54dec4c83cf72638cbcc8de /agg-plot/canvas.h | |
parent | 5022c5f533bb1f0b5241de0c4cd33fb0ca3508d1 (diff) | |
download | gsl-shell-37791df9f7ab54333c95894df33114e4d5a02310.tar.gz |
-rw-r--r-- | agg-plot/canvas.h | 7 |
diff --git a/agg-plot/canvas.h b/agg-plot/canvas.h index 3a35a501..c75417d2 100644 --- a/agg-plot/canvas.h +++ b/agg-plot/canvas.h @@ -44,9 +44,8 @@ public: void clear_box(const agg::rect_base<int>& r) { - unsigned len = r.x2 - r.x1; for (int y = r.y1; y < r.y2; y++) - m_ren_base.copy_hline (r.x1, y, len, m_bgcol); + m_ren_base.copy_hline (r.x1, y, r.x2, m_bgcol); } void clip_box(const agg::rect_base<int>& clip) @@ -95,9 +94,9 @@ public: void clear_box(const agg::rect_base<int>& r) { - unsigned len = subpixel_scale * (r.x2 - r.x1); + int x1 = subpixel_scale * r.x1, x2 = subpixel_scale * r.x2; for (int y = r.y1; y < r.y2; y++) - m_ren_base.copy_hline (subpixel_scale * r.x1, y, len, m_bgcol); + m_ren_base.copy_hline (x1, y, x2, m_bgcol); } void clip_box(const agg::rect_base<int>& clip) |