summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxblendedimage.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-04-29 00:10:35 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-04-29 00:10:35 (GMT)
commitdc5a2f46bd9676e69ed81d0b83199a533d1fca21 (patch)
tree9eb4b410c5243cceb45962bb880da865b80ea891 /src/declarative/fx/qfxblendedimage.cpp
parent978cf2724888f13ba1a0ebab65056c05fe112dad (diff)
parent1cb0906f04ed49de26575252740b8bb5190e3025 (diff)
downloadQt-dc5a2f46bd9676e69ed81d0b83199a533d1fca21.zip
Qt-dc5a2f46bd9676e69ed81d0b83199a533d1fca21.tar.gz
Qt-dc5a2f46bd9676e69ed81d0b83199a533d1fca21.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/declarative/fx/qfximageitem.cpp src/declarative/fx/qfxpathview.cpp src/declarative/util/qmllistmodel.cpp
Diffstat (limited to 'src/declarative/fx/qfxblendedimage.cpp')
-rw-r--r--src/declarative/fx/qfxblendedimage.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/declarative/fx/qfxblendedimage.cpp b/src/declarative/fx/qfxblendedimage.cpp
index ec2b9cc..3326ea8 100644
--- a/src/declarative/fx/qfxblendedimage.cpp
+++ b/src/declarative/fx/qfxblendedimage.cpp
@@ -173,7 +173,7 @@ bool QFxBlendedImage::smoothTransform() const
void QFxBlendedImage::setSmoothTransform(bool s)
{
- if(_smooth == s)
+ if (_smooth == s)
return;
_smooth = s;
update();
@@ -186,7 +186,7 @@ void QFxBlendedImage::paintContents(QPainter &p)
if (primSrc.isNull() && secSrc.isNull())
return;
- if(_smooth) {
+ if (_smooth) {
p.save();
p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, _smooth);
}
@@ -196,7 +196,7 @@ void QFxBlendedImage::paintContents(QPainter &p)
else
p.drawImage(0, 0, secPix);
- if(_smooth) {
+ if (_smooth) {
p.restore();
}
}
@@ -206,10 +206,10 @@ void QFxBlendedImage::paintContents(QPainter &p)
void QFxBlendedImage::paintGLContents(GLPainter &p)
{
static DualTextureBlendShader *shader = 0;
- if(!shader)
+ if (!shader)
shader = new DualTextureBlendShader();
- if(dirty) {
+ if (dirty) {
prim.clear();
sec.clear();
prim.setImage(primPix);
@@ -218,7 +218,7 @@ void QFxBlendedImage::paintGLContents(GLPainter &p)
dirty = false;
}
- if(prim.isNull() || sec.isNull()) {
+ if (prim.isNull() || sec.isNull()) {
return;
}
@@ -228,9 +228,9 @@ void QFxBlendedImage::paintGLContents(GLPainter &p)
float widthV = width();
float heightV = height();
- if(!widthV)
+ if (!widthV)
widthV = qMax(primPix.width(), secPix.width());
- if(!heightV)
+ if (!heightV)
heightV = qMax(primPix.height(), secPix.height());
vertices[0] = 0; vertices[1] = heightV;
@@ -243,12 +243,12 @@ void QFxBlendedImage::paintGLContents(GLPainter &p)
texVertices[4] = 0; texVertices[5] = 1;
texVertices[6] = 1; texVertices[7] = 1;
- if(_blend == 0 || _blend == 1) {
+ if (_blend == 0 || _blend == 1) {
QGLShaderProgram *tshader = p.useTextureShader();
GLTexture *tex = 0;
- if(_blend == 0)
+ if (_blend == 0)
tex = &prim;
else
tex = &sec;
@@ -271,8 +271,8 @@ void QFxBlendedImage::paintGLContents(GLPainter &p)
shader->enable();
shader->setOpacity(1);
qreal b = _blend;
- if(b > 1) b = 1;
- else if(b < 0) b = 0;
+ if (b > 1) b = 1;
+ else if (b < 0) b = 0;
shader->setBlend(b);
shader->setTransform(p.activeTransform);