summaryrefslogtreecommitdiff
path: root/libs/canvas
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-04-10 17:54:07 +0200
committerRobin Gareus <robin@gareus.org>2020-04-10 18:06:42 +0200
commit9bbedcb781cdb7d1dad1ee01bfa99c328c2813c2 (patch)
tree25455020e97beaef64d20bfc6053780234a92644 /libs/canvas
parent7bb8ca1e76986d1b6075627679fe37c143a44ab5 (diff)
Remove unused function
Cairo::curve_to renders cubic Bézier splines, those are not generally useful in a DAW context. Canvas::Curve implements centripetal catmull-rom spline drawing which can be used for fades and automation interpolation.
Diffstat (limited to 'libs/canvas')
-rw-r--r--libs/canvas/canvas/poly_item.h1
-rw-r--r--libs/canvas/poly_item.cc37
2 files changed, 0 insertions, 38 deletions
diff --git a/libs/canvas/canvas/poly_item.h b/libs/canvas/canvas/poly_item.h
index 25a832e571..3df13ff75f 100644
--- a/libs/canvas/canvas/poly_item.h
+++ b/libs/canvas/canvas/poly_item.h
@@ -42,7 +42,6 @@ public:
protected:
void render_path (Rect const&, Cairo::RefPtr<Cairo::Context>) const;
- void render_curve (Rect const&, Cairo::RefPtr<Cairo::Context>, Points const&, Points const&) const;
Points _points;
diff --git a/libs/canvas/poly_item.cc b/libs/canvas/poly_item.cc
index 3ea68c461d..dfd8bf0da9 100644
--- a/libs/canvas/poly_item.cc
+++ b/libs/canvas/poly_item.cc
@@ -130,43 +130,6 @@ PolyItem::interpolate_line (Duple& c0, Duple const& c1, Coord const x)
}
void
-PolyItem::render_curve (Rect const & area, Cairo::RefPtr<Cairo::Context> context, Points const & first_control_points, Points const & second_control_points) const
-{
- if (_points.size() <= 2) {
- render_path (area, context);
- return;
- }
-
- Points::const_iterator cp1 = first_control_points.begin();
- Points::const_iterator cp2 = second_control_points.begin();
- Points::const_iterator p = _points.begin();
- const double pixel_adjust = (_outline_width == 1.0 ? 0.5 : 0.0);
-
- Duple c = item_to_window (Duple (p->x, p->y));
- context->move_to (c.x + pixel_adjust, c.y + pixel_adjust);
- ++p;
-
- while (p != _points.end()) {
-
- Duple c1 = item_to_window (Duple (cp1->x, cp1->y));
- Duple c2 = item_to_window (Duple (cp2->x, cp2->y));
-
- c = item_to_window (Duple (p->x, p->y));
-
- context->curve_to (c1.x + pixel_adjust,
- c1.y + pixel_adjust,
- c2.x + pixel_adjust,
- c2.y + pixel_adjust,
- c.x + pixel_adjust,
- c.y + pixel_adjust);
-
- ++cp1;
- ++cp2;
- ++p;
- }
-}
-
-void
PolyItem::set (Points const & points)
{
if (_points != points) {