[Libreoffice-commits] .: Branch 'libreoffice-3-3-0' - cppcanvas/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Tue Jan 18 01:53:39 PST 2011
cppcanvas/source/mtfrenderer/implrenderer.cxx | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
New commits:
commit 1c9c9180b4105626e9242e5499b67180abf4a53c
Author: Andre Fischer <andre.f.fischer at oracle.com>
Date: Tue Jan 18 10:41:22 2011 +0100
calc65: #i116318# Fixed the painting of axial gradients.
Signed-off-by: Thorsten Behrens <tbehrens at novell.com>
(cherry picked from commit ea29f32bd5bc1a937a747bd5a1f5b37f570ed25f)
Signed-off-by: Michael Meeks <michael.meeks at novell.com>
Signed-off-by: Petr Mladek <pmladek at suse.cz>
Signed-off-by: Radek Doulik <rodo at novell.com>
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 4429ece..9c026b1 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -686,10 +686,23 @@ namespace cppcanvas
case GRADIENT_AXIAL:
{
- basegfx::tools::createLinearODFGradientInfo(aGradInfo,
+ // Adapt the border so that it is suitable
+ // for the axial gradient. An axial
+ // gradient consists of two linear
+ // gradients. Each of those covers half
+ // of the total size. In order to
+ // compensate for the condensed display of
+ // the linear gradients, we have to
+ // enlarge the area taken up by the actual
+ // gradient (1-fBorder). After that we
+ // have to turn the result back into a
+ // border value, hence the second (left
+ // most 1-...
+ const double fAxialBorder (1-2*(1-fBorder));
+ basegfx::tools::createAxialODFGradientInfo(aGradInfo,
aBounds,
nSteps,
- fBorder,
+ fAxialBorder,
fRotation);
// map odf to svg gradient orientation - x
// instead of y direction
More information about the Libreoffice-commits
mailing list