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


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


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.