Kaydet (Commit) ea4d69f5 authored tarafından Adam Co's avatar Adam Co Kaydeden (comit) Miklos Vajna

fdo#65295 - fix gradient focus issue

There was a wrong 'if' statement, that checked if the focus was over 75%
and also if the angle was less than 180. If so - it compensated for that
by adding 180 degrees to the angle (and losing the 'focus' attribute).
But it should do that even if the angle is more than 180 degrees, so
this was fixed.

Reviewed on:
	https://gerrit.libreoffice.org/6647

Change-Id: Ib2dc8a61359e656721c5c6c99587d4d547eed835
üst 4b0cb789
......@@ -740,7 +740,7 @@ void FillModel::pushToPropMap( ShapePropertyMap& rPropMap, const GraphicHelper&
gradient. BUT: For angles >= 180 deg., the
behaviour is reversed. This means that in this case
a focus of 0% swaps the gradient. */
if( ((fFocus < -0.75) || (fFocus > 0.75)) == (nVmlAngle < 180) )
if( fFocus < -0.5 || fFocus > 0.5 )
(nVmlAngle += 180) %= 360;
// set the start and stop colors
aFillProps.maGradientProps.maGradientStops[ 0.0 ] = aColor1;
......
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