diff options
author | Armin Le Grand <alg@apache.org> | 2012-10-02 08:23:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-11 10:32:54 +0100 |
commit | 385bb4547359027bca6d5158e00e541f094b277e (patch) | |
tree | a160b457cc7f649669e5eaddf9b8731ebe64e910 /cppcanvas | |
parent | 0de49e5d365a0ca3e667bcdd68630296b5e840d6 (diff) |
Resolves: #i120604# unified and secured gradient tooling for primitives
(cherry picked from commit 05785d283e718aab182a5ea848de72e4a4b2efe3)
Conflicts:
basegfx/inc/basegfx/tools/gradienttools.hxx
basegfx/source/tools/gradienttools.cxx
cppcanvas/source/mtfrenderer/implrenderer.cxx
drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
drawinglayer/inc/drawinglayer/texture/texture.hxx
drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
drawinglayer/source/processor2d/vclhelpergradient.cxx
Change-Id: I21f94e7b4eede094171a83a009ae19213e77f22c
Unname unused argument to prevent warnings.
(cherry picked from commit f7d4af835cf308bc9ece6fd84cbd14ba5be0adcd)
Change-Id: I44381f1e417c39dfbd1d4051079bbd09f0c61848
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfplus.cxx | 8 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 24 |
2 files changed, 16 insertions, 16 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 47b98bb72875..111c1e2268fa 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1030,20 +1030,20 @@ namespace cppcanvas basegfx::B2DRange aBoundsRectangle (0, 0, 1, 1); if (brush->type == 4) { aGradientService = "LinearGradient"; - basegfx::tools::createLinearODFGradientInfo( aGradInfo, + aGradInfo = basegfx::tools::createLinearODFGradientInfo( aBoundsRectangle, aStops.getLength(), 0, - 0 ); + 0); } else { aGradientService = "EllipticalGradient"; - basegfx::tools::createEllipticalODFGradientInfo( aGradInfo, + aGradInfo = basegfx::tools::createEllipticalODFGradientInfo( aBoundsRectangle, ::basegfx::B2DVector( 0, 0 ), aStops.getLength(), 0, - 0 ); + 0); } uno::Reference< lang::XMultiServiceFactory > xFactory( diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 769df3df5ee4..85a5cef24b38 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -676,14 +676,14 @@ namespace cppcanvas switch( rGradient.GetStyle() ) { case GradientStyle_LINEAR: - basegfx::tools::createLinearODFGradientInfo(aGradInfo, + aGradInfo = basegfx::tools::createLinearODFGradientInfo( aBounds, nSteps, fBorder, fRotation); // map ODF to svg gradient orientation - x // instead of y direction - aGradInfo.maTextureTransform = aGradInfo.maTextureTransform * aRot90; + aGradInfo.setTextureTransform(aGradInfo.getTextureTransform() * aRot90); aGradientService = "LinearGradient"; break; @@ -702,27 +702,27 @@ namespace cppcanvas // border value, hence the second (left // most 1-... const double fAxialBorder (1-2*(1-fBorder)); - basegfx::tools::createAxialODFGradientInfo(aGradInfo, + aGradInfo = basegfx::tools::createAxialODFGradientInfo( aBounds, nSteps, fAxialBorder, fRotation); // map ODF to svg gradient orientation - x // instead of y direction - aGradInfo.maTextureTransform = aGradInfo.maTextureTransform * aRot90; + aGradInfo.setTextureTransform(aGradInfo.getTextureTransform() * aRot90); // map ODF axial gradient to 3-stop linear // gradient - shift left by 0.5 basegfx::B2DHomMatrix aShift; - aShift.translate(-0.5,0); - aGradInfo.maTextureTransform = aGradInfo.maTextureTransform * aShift; + aShift.translate(-0.5,0); + aGradInfo.setTextureTransform(aGradInfo.getTextureTransform() * aShift); aGradientService = "LinearGradient"; break; } case GradientStyle_RADIAL: - basegfx::tools::createRadialODFGradientInfo(aGradInfo, + aGradInfo = basegfx::tools::createRadialODFGradientInfo( aBounds, aOffset, nSteps, @@ -731,7 +731,7 @@ namespace cppcanvas break; case GradientStyle_ELLIPTICAL: - basegfx::tools::createEllipticalODFGradientInfo(aGradInfo, + aGradInfo = basegfx::tools::createEllipticalODFGradientInfo( aBounds, aOffset, nSteps, @@ -741,7 +741,7 @@ namespace cppcanvas break; case GradientStyle_SQUARE: - basegfx::tools::createSquareODFGradientInfo(aGradInfo, + aGradInfo = basegfx::tools::createSquareODFGradientInfo( aBounds, aOffset, nSteps, @@ -751,7 +751,7 @@ namespace cppcanvas break; case GradientStyle_RECT: - basegfx::tools::createRectangularODFGradientInfo(aGradInfo, + aGradInfo = basegfx::tools::createRectangularODFGradientInfo( aBounds, aOffset, nSteps, @@ -767,7 +767,7 @@ namespace cppcanvas } ::basegfx::unotools::affineMatrixFromHomMatrix( aTexture.AffineTransform, - aGradInfo.maTextureTransform ); + aGradInfo.getTextureTransform() ); uno::Sequence<uno::Any> args(3); beans::PropertyValue aProp; @@ -778,7 +778,7 @@ namespace cppcanvas aProp.Value <<= aStops; args[1] <<= aProp; aProp.Name = "AspectRatio"; - aProp.Value <<= aGradInfo.mfAspectRatio; + aProp.Value <<= aGradInfo.getAspectRatio(); args[2] <<= aProp; aTexture.Gradient.set( |