From 247bd4d3d95230e7887d577d3bbdab8feb519b4d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 10 Apr 2020 18:32:18 +0200 Subject: NO-OP: whitespace --- libs/canvas/poly_line.cc | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'libs/canvas') diff --git a/libs/canvas/poly_line.cc b/libs/canvas/poly_line.cc index b1953ae4b8..a315f76174 100644 --- a/libs/canvas/poly_line.cc +++ b/libs/canvas/poly_line.cc @@ -20,8 +20,8 @@ #include -#include "canvas/poly_line.h" #include "canvas/canvas.h" +#include "canvas/poly_line.h" #include "canvas/utils.h" using namespace ArdourCanvas; @@ -54,18 +54,19 @@ PolyLine::compute_bounding_box () const } void -PolyLine::set_fill_y1 (double y1) { +PolyLine::set_fill_y1 (double y1) +{ begin_change (); _bounding_box_dirty = true; - _y1 = y1; + _y1 = y1; end_change (); } void -PolyLine::render (Rect const & area, Cairo::RefPtr context) const +PolyLine::render (Rect const& area, Cairo::RefPtr context) const { - if (_fill && _y1 > 0 && _points.size() > 0) { - const ArdourCanvas::Rect& vp (_canvas->visible_area()); + if (_fill && _y1 > 0 && _points.size () > 0) { + const ArdourCanvas::Rect& vp (_canvas->visible_area ()); setup_fill_context (context); Duple y (0, _y1); @@ -97,35 +98,35 @@ PolyLine::render (Rect const & area, Cairo::RefPtr context) cons } void -PolyLine::set_steps (Points const & points, bool stepped) +PolyLine::set_steps (Points const& points, bool stepped) { if (!stepped) { - PolyItem::set(points); + PolyItem::set (points); return; } Points copy; - for (Points::const_iterator p = points.begin(); p != points.end();) { + for (Points::const_iterator p = points.begin (); p != points.end ();) { Points::const_iterator next = p; ++next; - copy.push_back(*p); - if (next != points.end() && next->x != p->x) { - copy.push_back(Duple(next->x, p->y)); + copy.push_back (*p); + if (next != points.end () && next->x != p->x) { + copy.push_back (Duple (next->x, p->y)); } p = next; } - PolyItem::set(copy); + PolyItem::set (copy); } bool -PolyLine::covers (Duple const & point) const +PolyLine::covers (Duple const& point) const { Duple p = window_to_item (point); - const Points::size_type npoints = _points.size(); + const Points::size_type npoints = _points.size (); if (npoints < 2) { return false; @@ -136,14 +137,13 @@ PolyLine::covers (Duple const & point) const /* repeat for each line segment */ - const Rect visible (window_to_item (_canvas->visible_area())); + const Rect visible (window_to_item (_canvas->visible_area ())); for (i = 1, j = 0; i < npoints; ++i, ++j) { - - Duple at; + Duple at; double t; - Duple a (_points[j]); - Duple b (_points[i]); + Duple a (_points[j]); + Duple b (_points[i]); /* Clamp the line endpoints to the visible area of the canvas. If we do @@ -165,7 +165,6 @@ PolyLine::covers (Duple const & point) const if (d < _threshold + _outline_width) { return true; } - } return false; -- cgit v1.2.3