gradient angles

Christina Roßmanith ChrRossmanith at
Sun Jul 29 14:04:24 PDT 2012

Am 29.07.2012 18:25, schrieb Regina Henschel:
> Hi Christina,
> I'm not sure about what you want to know.
> Christina Roßmanith schrieb:
>> Hi,
>> just to be sure before I continue my work:
>> SVG gradient with angle=0° changes color from left to right
>>       (I'm taking this from
> The svg:gradient does not has an angle, but a start point and an end 
> point. The start point has the color of the 0%-stop color and the end 
> point has the color of the 100%-stop color.
You are right, there is no angle but transforms are applied to the 
gradient vector (and normal). So the question is what is the direction 
of the gradient vector in absence of any transform and the w3c test 
suite gives the answer: from left to right (along the positive x axis?)
>> ODF gradient with angle=0° changes color from top to bottom
>>       (I can't find any meaning of the angle attribute here
> I think, that the specification is not clear about the untransformed 
> direction of the gradient vector. "Gradient vector" is for me the 
> direction from start color to end color in the way, that a line with 
> points of same color is perpendicular to the gradient vector.
> LibreOffice handles it in the way, that the untransformed gradient 
> vector is in direction of the positive y-axis, that is on screen from 
> top to bottom.
That means I have to rotate the gradient orientation 90° ccw when 
importing svg gradients.
> The draw:angle is the angle the gradient vector is rotated. Where it 
> has the same rule as other rotations, that it is on screen against 
> clock, which will be clockwise in calculation because of the top-down 
> direction of the y-axis.
> LibreOffice handles the angle unit as 0.1°, whereas in ODF1.2 the 
> angle unit defaults to 1°.
That might explain why in a fodg file which I've modified by hand a 
gradient angle of "90" is interpreted as "9".


More information about the LibreOffice mailing list