From 846c70417e1aecc56a6ee1504c2c160e633d0754 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Thu, 13 Jan 2011 16:25:57 +0100 Subject: calc65: #i116318# Fixed the painting of axial gradients. --- cppcanvas/source/mtfrenderer/implrenderer.cxx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'cppcanvas/source/mtfrenderer') diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 1423cd42ed93..592aa6e41ba9 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -682,10 +682,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 -- cgit