summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorAndre Fischer <andre.f.fischer@oracle.com>2011-01-18 10:41:22 +0100
committerThorsten Behrens <tbehrens@novell.com>2011-01-18 10:41:22 +0100
commitde2dd7a15678d2968cd7c22d74e7056c35a051f3 (patch)
tree33138a2dbfd99cdbafdc398705756b602644e957 /cppcanvas
parente7df509dd920497f475725a1cab74856c3da605e (diff)
calc65: #i116318# Fixed the painting of axial gradients.
Signed-off-by: Thorsten Behrens <tbehrens@novell.com>
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index cef7e1eed16c..ed07162f973c 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