]> git.sesse.net Git - kdenlive/commitdiff
Bezier Spline:
authorTill Theato <root@ttill.de>
Sun, 2 Jan 2011 16:27:37 +0000 (16:27 +0000)
committerTill Theato <root@ttill.de>
Sun, 2 Jan 2011 16:27:37 +0000 (16:27 +0000)
- raise number of calculated values once again
- use antialiasing for the spline
- draw the standard line

svn path=/trunk/kdenlive/; revision=5240

src/beziercurve/beziersplineeditor.cpp
src/beziercurve/cubicbezierspline.cpp

index 3c35a66ed5c5a82dd73a82fecd3239350b709409..a5a5484c18d5695b583701d8a55ec5337fc61483 100644 (file)
@@ -135,11 +135,6 @@ void BezierSplineEditor::paintEvent(QPaintEvent* event)
         p.drawPixmap(offset, offset, *m_pixmapCache);
     }
 
-    /*
-     * Standard line
-     */
-    /*p.setPen(QPen(Qt::gray, 1, Qt::SolidLine));
-    p.drawLine(QLineF(0, wHeight, wWidth, 0));*/
 
     p.setPen(QPen(Qt::gray, 1, Qt::SolidLine));
 
@@ -162,6 +157,13 @@ void BezierSplineEditor::paintEvent(QPaintEvent* event)
         }
     }
 
+    p.setRenderHint(QPainter::Antialiasing);
+
+    /*
+     * Standard line
+     */
+    p.drawLine(QLineF(0, wHeight, wWidth, 0).translated(offset, offset));
+
     /*
      * Spline
      */
index d2249332b383c6f7a242627f47fdd98a846b4836..b30f27a8230bda5034830d1f007af1b4de1bcc4f 100644 (file)
@@ -225,7 +225,7 @@ void CubicBezierSpline::update()
                 << m_points.at(i+1).h1
                 << m_points.at(i+1).p;
 
-        int numberOfValues = (int)((points[3].x() - points[0].x()) * m_precision * 2);
+        int numberOfValues = (int)((points[3].x() - points[0].x()) * m_precision * 5);
         if (numberOfValues == 0)
             numberOfValues = 1;
         double step = 1 / (double)numberOfValues;