diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-05-08 03:36:19 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-05-08 03:36:19 (GMT) |
commit | 9dcc7f9fea95d41f82fdde700f1a17da81257451 (patch) | |
tree | 8b26b0d84673e0bee1a28db07fcaf67c6d2fc94e /src/declarative/fx | |
parent | 0aa5eae761bfde781100602577f33cf667a0640d (diff) | |
download | Qt-9dcc7f9fea95d41f82fdde700f1a17da81257451.zip Qt-9dcc7f9fea95d41f82fdde700f1a17da81257451.tar.gz Qt-9dcc7f9fea95d41f82fdde700f1a17da81257451.tar.bz2 |
Remove non-working scale-to-width code.
This does not belong here. Zooming can be done by parent. Also, it doesn't work.
(was previously also removed from QFxWebView)
Diffstat (limited to 'src/declarative/fx')
-rw-r--r-- | src/declarative/fx/qfxpainteditem.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/declarative/fx/qfxpainteditem.cpp b/src/declarative/fx/qfxpainteditem.cpp index 950b468..4d2e327 100644 --- a/src/declarative/fx/qfxpainteditem.cpp +++ b/src/declarative/fx/qfxpainteditem.cpp @@ -252,9 +252,7 @@ void QFxPaintedItem::paintGLContents(GLPainter &p) const QRectF clipf = p.sceneClipRect; #endif - qreal hscale = widthValid() ? qreal(width()) / content.width() : heightValid() ? qreal(height()) / content.height() : 1.0; - qreal vscale = heightValid() ? qreal(height()) / content.height() : widthValid() ? qreal(width()) / content.width() : 1.0; - const QRect clip = mapFromScene(QRectF(clipf.x()/hscale,clipf.y()/vscale,clipf.width()/hscale,clipf.height()/vscale)).toRect(); + const QRect clip = mapFromScene(clipf).toRect(); QRegion topaint(clip); topaint &= content; @@ -272,7 +270,7 @@ void QFxPaintedItem::paintGLContents(GLPainter &p) for (int i=0; i<d->imagecache.count(); ++i) { QRect area = d->imagecache[i]->area; if (topaint.contains(area)) { - QRectF target(area.x()*hscale, area.y()*vscale, area.width()*hscale, area.height()*vscale); + QRectF target(area.x(), area.y(), area.width(), area.height()); p.drawImage(target.toRect(), d->imagecache[i]->image); topaint -= area; d->imagecache[i]->age=0; @@ -324,7 +322,7 @@ void QFxPaintedItem::paintGLContents(GLPainter &p) newitem->image.setImage(img); #endif d->imagecache.append(newitem); - QRectF target(r.x()*hscale, r.y()*vscale, r.width()*hscale, r.height()*vscale); + QRectF target(r.x(), r.y(), r.width(), r.height()); p.drawImage(target.toRect(), newitem->image); } } |