projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix broken logic and possible NULL pointer dereference for Bundle XML.
[ardour.git]
/
libs
/
canvas
/
curve.cc
diff --git
a/libs/canvas/curve.cc
b/libs/canvas/curve.cc
index ce479b28bbc986a4b37decb8ba93cf9142fa1dcf..ba6ac68df6d651730b436f4a447ee26defe23dba 100644
(file)
--- a/
libs/canvas/curve.cc
+++ b/
libs/canvas/curve.cc
@@
-27,10
+27,17
@@
using namespace ArdourCanvas;
using std::min;
using std::max;
using std::min;
using std::max;
-Curve::Curve (Group* parent)
- : Item (parent)
- , PolyItem (parent)
- , Fill (parent)
+Curve::Curve (Canvas* c)
+ : PolyItem (c)
+ , n_samples (0)
+ , points_per_segment (16)
+ , curve_type (CatmullRomCentripetal)
+ , curve_fill (None)
+{
+}
+
+Curve::Curve (Item* parent)
+ : PolyItem (parent)
, n_samples (0)
, points_per_segment (16)
, curve_type (CatmullRomCentripetal)
, n_samples (0)
, points_per_segment (16)
, curve_type (CatmullRomCentripetal)
@@
-235,7
+242,7
@@
Curve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
bool
Curve::covers (Duple const & pc) const
{
bool
Curve::covers (Duple const & pc) const
{
- Duple point =
canvas
_to_item (pc);
+ Duple point =
window
_to_item (pc);
/* O(N) N = number of points, and not accurate */
/* O(N) N = number of points, and not accurate */