]> git.sesse.net Git - kdenlive/blobdiff - src/beziercurve/bpoint.cpp
Bezier Spline:
[kdenlive] / src / beziercurve / bpoint.cpp
index c335b4cd69d24560847167ba748cee1395a4403b..2c5496555fec85873970f850f908ded8da5638d9 100644 (file)
@@ -35,6 +35,16 @@ BPoint::BPoint(QPointF handle1, QPointF point, QPointF handle2) :
     autoSetLinked();
 }
 
+QPointF &BPoint::operator[](int i)
+{
+    return i == 0 ? h1 : (i == 1 ? p : h2);
+}
+
+const QPointF &BPoint::operator[](int i) const
+{
+    return i == 0 ? h1 : (i == 1 ? p : h2);
+}
+
 bool BPoint::operator==(const BPoint& point) const
 {
     return      point.h1 == h1 &&