diff --git a/libs/canvas/canvas/poly_item.h b/libs/canvas/canvas/poly_item.h index 3df13ff75f..dc3c61c9b2 100644 --- a/libs/canvas/canvas/poly_item.h +++ b/libs/canvas/canvas/poly_item.h @@ -46,8 +46,8 @@ protected: Points _points; /* these return screen-cordidates of the most recent render_path() */ - Duple const& leftedge () const { return _left; } - Duple const& rightedge () const { return _right; } + Duple const& left_edge () const { return _left; } + Duple const& right_edge () const { return _right; } private: static bool interpolate_line (Duple&, Duple const&, Coord const); diff --git a/libs/canvas/poly_line.cc b/libs/canvas/poly_line.cc index 7ef8e4a5aa..b1953ae4b8 100644 --- a/libs/canvas/poly_line.cc +++ b/libs/canvas/poly_line.cc @@ -71,17 +71,17 @@ PolyLine::render (Rect const & area, Cairo::RefPtr context) cons Duple y (0, _y1); float y1 = item_to_window (y).y; render_path (area, context); - Duple const& c0 (rightedge ()); - Duple const& c1 (leftedge ()); - if (c0.x < vp.x1) { - context->line_to (vp.x1, c0.y); + Duple const& c0 (left_edge ()); + Duple const& c1 (right_edge ()); + if (c1.x < vp.x1) { + context->line_to (vp.x1, c1.y); context->line_to (vp.x1, y1); } else { context->line_to (vp.x1, y1); } - if (c1.x > vp.x0) { + if (c0.x > vp.x0) { context->line_to (vp.x0, y1); - context->line_to (vp.x0, c1.y); + context->line_to (vp.x0, c0.y); } else { context->line_to (vp.x0, y1); }