[vlc-commits] commit: Qt4: use transform in pictureflow to ease up drawing ( Ilkka Ollakka )

git at videolan.org git at videolan.org
Tue Dec 14 22:46:29 CET 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Thu Dec  9 17:45:21 2010 +0200| [5c40d8ad4c188c6be5d3fca93d39297f797b1b8f] | committer: Ilkka Ollakka 

Qt4: use transform in pictureflow to ease up drawing

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c40d8ad4c188c6be5d3fca93d39297f797b1b8f
---

 modules/gui/qt4/util/pictureflow.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/util/pictureflow.cpp b/modules/gui/qt4/util/pictureflow.cpp
index cd57539..17484fe 100644
--- a/modules/gui/qt4/util/pictureflow.cpp
+++ b/modules/gui/qt4/util/pictureflow.cpp
@@ -512,6 +512,8 @@ static QImage* prepareSurface(const QImage* slideImage, int w, int h, QRgb bgcol
     QPainter imagePainter( result );
     QTransform rotation;
     rotation.rotate(90);
+    rotation.scale(1,-1);
+    rotation.translate( 0, hofs );
     result->fill(bgcolor);
 
     // transpose the image, this is to speed-up the rendering
@@ -601,7 +603,8 @@ static QImage* prepareSurface(const QImage* slideImage, int w, int h, QRgb bgcol
             }
 
             // overdraw to leave only the reflection blurred (but not the actual image)
-            imagePainter.drawImage( hofs, 0, img.mirrored().transformed( rotation ) );
+            imagePainter.setTransform( rotation );
+            imagePainter.drawImage( 0, 0, img );
             /*
             for (int x = 0; x < w; x++)
                 for (int y = 0; y < h; y++)



More information about the vlc-commits mailing list