diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-10-06 03:38:02 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-10-06 03:38:02 (GMT) |
commit | 2ec7f08421f484339818c731594f12ddb22d38c0 (patch) | |
tree | f98c1341b9beefa8ffb3876b277a1dc99834c15e /src/declarative/fx | |
parent | 44ad2433eae7dce70a797aa1f7055058a2558a74 (diff) | |
parent | b9663faad39ae02b7dbee9f2cea7dce7d25894f8 (diff) | |
download | Qt-2ec7f08421f484339818c731594f12ddb22d38c0.zip Qt-2ec7f08421f484339818c731594f12ddb22d38c0.tar.gz Qt-2ec7f08421f484339818c731594f12ddb22d38c0.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/fx')
-rw-r--r-- | src/declarative/fx/qfxrect.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/fx/qfxrect.cpp index 0648ac4..e802c94 100644 --- a/src/declarative/fx/qfxrect.cpp +++ b/src/declarative/fx/qfxrect.cpp @@ -427,14 +427,15 @@ void QFxRect::drawRect(QPainter &p) int offset = 0; const int pw = d->pen && d->pen->isValid() ? (d->pen->width()+1)/2*2 : 0; + const int realpw = d->pen && d->pen->isValid() ? d->pen->width() : 0; if (d->radius > 0) { generateRoundedRect(); //### implicit conversion to int - offset = int(d->radius+1.5+pw); + offset = int(d->radius+realpw+1); } else { generateBorderedRect(); - offset = pw+1; + offset = realpw+1; } //basically same code as QFxImage uses to paint sci images @@ -457,6 +458,8 @@ void QFxRect::drawRect(QPainter &p) ySide = yOffset * 2; } + Q_ASSERT(d->rectImage.width() >= 2*xOffset + 1); + Q_ASSERT(d->rectImage.height() >= 2*yOffset + 1); QMargins margins(xOffset, yOffset, xOffset, yOffset); QTileRules rules(Qt::StretchTile, Qt::StretchTile); qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width()+pw, height()+pw), margins, d->rectImage, d->rectImage.rect(), margins, rules); @@ -479,6 +482,8 @@ void QFxRect::drawRect(QPainter &p) \note Generally scaling artifacts are only visible if the item is stationary on the screen. A common pattern when animating an item is to disable smooth filtering at the beginning of the animation and reenable it at the conclusion. + + \image rect-smooth.png */ QRectF QFxRect::boundingRect() const |