diff options
author | Tünde Tóth <tundeth@gmail.com> | 2020-05-29 10:51:13 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-08-07 12:03:01 +0200 |
commit | 52f8e0b6f09be0e8e8a068edef2017d45d5a1892 (patch) | |
tree | fda32b3854eef764ad9420108d5fb01a3a0d7551 /basegfx/source | |
parent | cba368b233ea874df0d9c9fcd4d234d412ac8681 (diff) |
tdf#133477 basegfx: fix center of rotated gradients
in the case of square and quadratic gradient styles.
Change-Id: I2e5522930b472bf2ee702c780f39aa187bd7b64f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95356
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'basegfx/source')
-rw-r--r-- | basegfx/source/tools/gradienttools.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/basegfx/source/tools/gradienttools.cxx b/basegfx/source/tools/gradienttools.cxx index 082f564556a4..3605d8fe0be0 100644 --- a/basegfx/source/tools/gradienttools.cxx +++ b/basegfx/source/tools/gradienttools.cxx @@ -244,9 +244,9 @@ namespace basegfx // add defined offsets after rotation if(!fTools::equal(0.5, rOffset.getX()) || !fTools::equal(0.5, rOffset.getY())) { - // use scaled target size - fTargetOffsetX += (rOffset.getX() - 0.5) * fTargetSizeX; - fTargetOffsetY += (rOffset.getY() - 0.5) * fTargetSizeY; + // use original target size + fTargetOffsetX += (rOffset.getX() - 0.5) * rTargetRange.getWidth(); + fTargetOffsetY += (rOffset.getY() - 0.5) * rTargetRange.getHeight(); } // add object translate |