summaryrefslogtreecommitdiff
path: root/libs/canvas
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-04-10 18:01:04 +0200
committerRobin Gareus <robin@gareus.org>2020-04-10 18:06:42 +0200
commit2177462b73c9ab85fce0d91b63a1e082a33da7aa (patch)
tree9a59c4204a7d7ddd5a627259d1ff7305fcc0573d /libs/canvas
parentbc4de874dcb23ba1862cbf7e867db3646c9a41f7 (diff)
NO-OP: consistent function and variable naming
Diffstat (limited to 'libs/canvas')
-rw-r--r--libs/canvas/canvas/poly_item.h4
-rw-r--r--libs/canvas/poly_line.cc12
2 files changed, 8 insertions, 8 deletions
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<Cairo::Context> 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);
}