Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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

Christina

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.