Apache OpenOffice (AOO) Bugzilla – Issue 120397
svg: gradient vector ignored, when end points outside view box
Last modified: 2013-07-12 16:18:54 UTC
Created attachment 78771 [details] example with rotated gradient vector Open the attached document in a browser to see how it should be rendered. Start a new Draw document and insert the attached svg-picture. Notice, that the gradient is not rotated. The reason is, that the end points (x1|y1) and (x2|y2) of the gradient vector are outside the view box. But that is necessary for to start the color gradient in the corner of the rectangle. Therefore such vectors need to be interpreted too. The attached file has been generated be AOO, I corrected only the wrong colors.
ALG: Could reproduce, taking ownership.
Created attachment 78797 [details] Test doc with gradient in various rotations for two rectangles with different aspect ratio ALG: The import is okay, problem is in SvgLinearGradientPrimitive2D::create2DDecomposition which uses the unified gradient definition, but wrongly applies it to the object transformation. This leads to applying the rotation angle (which is implicit in the SvgLinearGradientPrimitive2D by the start and end position) to the unified range (1.0, 1.0), not to the object-defined one (in this case 10000, 4000). Changed that, created test document.
"alg" committed SVN revision 1367886 into trunk: #120397# Corrected linear gradient primitive decomposition
ALG: Done.
verify on AOO350ml 1377620 on Win7-64bit,pass