gradient angles

Regina Henschel rb.henschel at t-online.de
Sun Jul 29 09:25:04 PDT 2012


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
> http://www.w3.org/TR/SVG/pservers.html#LinearGradientElement)

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.

>
> ODF gradient with angle=0° changes color from top to bottom
>       (I can't find any meaning of the angle attribute here
> http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1416460_253892949)

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.

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°.

I need to look in which way PowerPoint writes the gradient in ODF1.2 format.

Kind regards
Regina



More information about the LibreOffice mailing list