summaryrefslogtreecommitdiff
path: root/basegfx/source/tools
diff options
context:
space:
mode:
authorthb <thb@openoffice.org>2010-01-18 18:58:26 +0100
committerthb <thb@openoffice.org>2010-01-18 18:58:26 +0100
commit4338fe5d7d67224771e2f1dae26d281b63c50595 (patch)
treee16eb9c314af24ad03d94ed2d65b54e70f010d46 /basegfx/source/tools
parent04e61ab1857ee1b660a3d2ef56a0fa6172d9804a (diff)
#i105937# Post-merge fixes
* nicer gradient poly setup, made code more self-explanatory * corrected order of rotation matrix multiplication * fixed build breakage in presenter screen, type only implicitely included
Diffstat (limited to 'basegfx/source/tools')
-rw-r--r--basegfx/source/tools/gradienttools.cxx26
1 files changed, 10 insertions, 16 deletions
diff --git a/basegfx/source/tools/gradienttools.cxx b/basegfx/source/tools/gradienttools.cxx
index 8a2d38f44c6f..69dbf9e5ae28 100644
--- a/basegfx/source/tools/gradienttools.cxx
+++ b/basegfx/source/tools/gradienttools.cxx
@@ -94,9 +94,8 @@ namespace basegfx
{
const B2DPoint aCenter(0.5*fTargetSizeX,
0.5*fTargetSizeY);
- o_rGradientInfo.maTextureTransform =
- o_rGradientInfo.maTextureTransform
- * basegfx::tools::createRotateAroundPoint(aCenter, fAngle);
+ o_rGradientInfo.maTextureTransform *=
+ basegfx::tools::createRotateAroundPoint(aCenter, fAngle);
}
// add object translate
@@ -155,17 +154,13 @@ namespace basegfx
o_rGradientInfo.maTextureTransform.translate(0.5, 0.5);
o_rGradientInfo.maTextureTransform.scale(fTargetSizeX, fTargetSizeY);
- if( !bCircular )
+ // add texture rotate after scale to keep perpendicular angles
+ if( !bCircular && 0.0 != fAngle)
{
- // add texture rotate after scale to keep perpendicular angles
- if(0.0 != fAngle)
- {
- const B2DPoint aCenter(0.5*fTargetSizeX,
- 0.5*fTargetSizeY);
- o_rGradientInfo.maTextureTransform =
- o_rGradientInfo.maTextureTransform
- * basegfx::tools::createRotateAroundPoint(aCenter, fAngle);
- }
+ const B2DPoint aCenter(0.5*fTargetSizeX,
+ 0.5*fTargetSizeY);
+ o_rGradientInfo.maTextureTransform *=
+ basegfx::tools::createRotateAroundPoint(aCenter, fAngle);
}
// add defined offsets after rotation
@@ -232,9 +227,8 @@ namespace basegfx
{
const B2DPoint aCenter(0.5*fTargetSizeX,
0.5*fTargetSizeY);
- o_rGradientInfo.maTextureTransform =
- o_rGradientInfo.maTextureTransform
- * basegfx::tools::createRotateAroundPoint(aCenter, fAngle);
+ o_rGradientInfo.maTextureTransform *=
+ basegfx::tools::createRotateAroundPoint(aCenter, fAngle);
}
// add defined offsets after rotation