]> git.sesse.net Git - kdenlive/blobdiff - src/colortools.cpp
Add mlt and encoder threads to render dialog.
[kdenlive] / src / colortools.cpp
index 6e44a33473f9a5f02759aab215671e2c86debf3a..eeb659829a90c325a1f5df7d1d043e617b2a5249 100644 (file)
@@ -134,7 +134,7 @@ QImage ColorTools::yuvVerticalPlane(const QSize &size, const float &angle, const
 
 }
 
-QImage ColorTools::rgbCurvePlane(const QSize &size, const ColorTools::ColorsRGB &color, float scaling)
+QImage ColorTools::rgbCurvePlane(const QSize &size, const ColorTools::ColorsRGB &color, float scaling, const QRgb &background)
 {
     Q_ASSERT(scaling > 0 && scaling <= 1);
 
@@ -169,6 +169,8 @@ QImage ColorTools::rgbCurvePlane(const QSize &size, const ColorTools::ColorsRGB
                 plane.setPixel(x, (h-y-1), qRgb(dval, dcol, dval));
             } else if (color == ColorTools::COL_B){
                 plane.setPixel(x, (h-y-1), qRgb(dval, dval, dcol));
+            } else if (color == ColorTools::COL_A) {
+                plane.setPixel(x, (h-y-1), qRgb(dcol / 255. * qRed(background), dcol / 255. * qGreen(background), dcol / 255. * qBlue(background)));
             } else {
                 plane.setPixel(x, (h-y-1), qRgb(dcol, dcol, dcol));
             }