diff options
author | nick_m <mainsbridge@gmail.com> | 2016-06-04 06:00:41 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-06-04 06:00:41 +1000 |
commit | 62be6b2ed82d3e5aaa69d0e49fd2e34c71a762e4 (patch) | |
tree | 81acf9f012ef5094e61c45cccfb72586f08d0a1d /libs/canvas | |
parent | 260058a4a966462fe4835b15f31aa2ac3dcfd8d3 (diff) |
Fix framed curve thinko.
- in FramedCurve, the first _point is used for the bounding box.
Don't confuse this with actual data.
Diffstat (limited to 'libs/canvas')
-rw-r--r-- | libs/canvas/framed_curve.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libs/canvas/framed_curve.cc b/libs/canvas/framed_curve.cc index 4e7b4a8796..6cb2aa9d18 100644 --- a/libs/canvas/framed_curve.cc +++ b/libs/canvas/framed_curve.cc @@ -203,15 +203,12 @@ FramedCurve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) c /* a redraw may have been requested between the last sample and the last point.*/ + const Duple first_point = Duple (samples[left].x, samples[left].y); Duple last_point = Duple (samples[right].x, samples[right].y); - Duple first_point = Duple (samples[left].x, samples[left].y); if (draw.x1 > last_point.x) { last_point = Duple (_points.back().x, _points.back().y); } - if (draw.x0 < first_point.x) { - first_point = Duple (_points.front().x, _points.front().y); - } window_space = item_to_window (first_point); context->move_to (window_space.x, window_space.y); |