]> git.sesse.net Git - kdenlive/blobdiff - src/beziercurve/cubicbezierspline.h
Bezier Spline: Fix point entries remaining active for a point not existing anymore...
[kdenlive] / src / beziercurve / cubicbezierspline.h
index 078066e29cc20f8d47ba2eda471ca233d5d907ed..ebf15e3d9f94506cc702a74c2abb9be387384c2a 100644 (file)
 #ifndef CUBICBEZIERSPLINE_H
 #define CUBICBEZIERSPLINE_H
 
+#include "bpoint.h"
 
 #include <QtCore>
 
-class BPoint
-{
-public:
-    QPointF h1;     // handle 1
-    QPointF p;      // point
-    QPointF h2;     // handle 2
-
-    bool operator==(const BPoint &point) const { return point.h1 == h1 && point.p == p && point.h2 == h2; }
-};
 
 class CubicBezierSpline : public QObject
 {
@@ -58,6 +50,7 @@ private:
     void validatePoints();
     void keepSorted();
     void update();
+    int indexOf(const BPoint &p);
 
     QList <BPoint> m_points;
     QMap <double, double> m_spline;