demos/embedded/fluidlauncher/pictureflow.cpp
changeset 37 758a864f9613
parent 18 2f34d5167611
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   601 static QImage prepareSurface(QImage img, int w, int h)
   601 static QImage prepareSurface(QImage img, int w, int h)
   602 {
   602 {
   603   Qt::TransformationMode mode = Qt::SmoothTransformation;
   603   Qt::TransformationMode mode = Qt::SmoothTransformation;
   604   img = img.scaled(w, h, Qt::IgnoreAspectRatio, mode);
   604   img = img.scaled(w, h, Qt::IgnoreAspectRatio, mode);
   605 
   605 
   606   // slightly larger, to accomodate for the reflection
   606   // slightly larger, to accommodate for the reflection
   607   int hs = h * 2;
   607   int hs = h * 2;
   608   int hofs = h / 3;
   608   int hofs = h / 3;
   609 
   609 
   610   // offscreen buffer: black is sweet
   610   // offscreen buffer: black is sweet
   611   QImage result(hs, w, QImage::Format_RGB16);
   611   QImage result(hs, w, QImage::Format_RGB16);