Gradients
Regina Henschel
rb.henschel at t-online.de
Fri Sep 14 14:47:28 PDT 2012
Hi Christina,
Christina Roßmanith schrieb:
> Hi,
>
> I'll have a look at gradients again. Could someone please have a look at
> the following two gradient specifications and tell me if they are
> supposed to look the same:
>
>
> 1. Created by LibreOffice (create rectangle in Draw, fill with a blue to
> green gradient, save as fodg)
>
> <draw:gradient draw:name="Gradient_20_7" draw:display-name="Gradient
> 7" draw:style="linear" draw:start-color="#0000ff"
> draw:end-color="#00ff00" draw:start-intensity="100%"
> draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
>
>
> 2. Modified by me to use svg:linearGradient instead of draw:gradient
> (rendered as a grey to white gradient, clearly has to be improved :-) )
>
> <svg:linearGradient draw:name="Gradient_20_7"
> draw:display-name="Gradient 7">
> <svg:stop svg:offset="0" svg:stop-color="#0000ff"
> svg:stop-opacity="100%" />
> <svg:stop svg:offset="1" svg:stop-color="#00ff00"
> svg:stop-opacity="100%" />
> </svg:linearGradient>
No, they are not the same.
The draw gradient style "linear" alters the colors form top to bottom
for angle=0, the svg gradient alters the colors from left to right for
the default gradient vector. You need a 90° rotation somewhere.
The draw gradient allows step coloring, the svg gradient not.
The draw gradient is applied to the bound rectangle of the rotated
object, the svg gradient has fill rule "userSpaceOnUse".
Kind regards
Regina
More information about the LibreOffice
mailing list