This commit is contained in:
Kovid Goyal 2016-05-12 22:55:48 +05:30
parent 8fa4274974
commit dc0942b6f8

View File

@ -641,7 +641,7 @@ static QImage prepareSurface(QImage srcimg, int w, int h, bool doReflections, bo
if (doReflections) { if (doReflections) {
// create the reflection // create the reflection
ht = hs - h; ht = hs - h;
for(x = 0; x < w; x++) for(x = 0; x < w; x++) {
for(y = 0; y < ht; y++) for(y = 0; y < ht; y++)
{ {
color = img.pixel(x, img.height()-y-1); color = img.pixel(x, img.height()-y-1);
@ -652,6 +652,7 @@ static QImage prepareSurface(QImage srcimg, int w, int h, bool doReflections, bo
b = qBlue(color) * a / 256 * (ht - y) / ht * 3/5; b = qBlue(color) * a / 256 * (ht - y) / ht * 3/5;
result.setPixel(h+y, x, qRgb(r, g, b)); result.setPixel(h+y, x, qRgb(r, g, b));
} }
}
} }
return result; return result;