Kaydet (Commit) aa5d7477 authored tarafından Armin Le Grand's avatar Armin Le Grand

tdf#117949 Use small overlap for SVG gradient representation

Change-Id: Idd55df31aa87cc40dbb15001479cdc79e918ac19
Reviewed-on: https://gerrit.libreoffice.org/55376Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarArmin Le Grand <Armin.Le.Grand@cib.de>
üst 90088d43
......@@ -915,14 +915,21 @@ namespace drawinglayer
// use color distance and discrete lengths to calculate step count
const sal_uInt32 nSteps(calculateStepsForSvgGradient(getColorA(), getColorB(), fDelta, fDiscreteUnit));
// tdf#117949 Use a small amount of discrete overlap at the edges. Usually this
// should be exactly 0.0 and 1.0, but there were cases when this gets clipped
// against the mask polygon which got numerically problematic.
// This change is unnecessary in that respect, but avoids that numerical havoc
// by at the same time doing no real harm AFAIK
// TTTT: Remove again when clipping is fixed (!)
// prepare polygon in needed width at start position (with discrete overlap)
const basegfx::B2DPolygon aPolygon(
basegfx::utils::createPolygonFromRect(
basegfx::B2DRange(
getOffsetA() - fDiscreteUnit,
0.0,
-0.0001, // TTTT -> should be 0.0, see comment above
getOffsetA() + (fDelta / nSteps) + fDiscreteUnit,
1.0)));
1.0001))); // TTTT -> should be 1.0, see comment above
// prepare loop (inside to outside, [0.0 .. 1.0[)
double fUnitScale(0.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment