ODF specification regarding multistop/-color gradients

Heiko Tietze tietze.heiko at googlemail.com
Sat Sep 10 09:11:40 UTC 2016

Hello all,

the LibreOffice conference gave me the chance to present some ideas regarding Draw and shapes in general. One of the most wanted features is the multistop gradient. Today we can define gradients between two colors, either linear, radial, or whatever. It would be nice to have a) non-linear multistop gradients, for example to illustrate a sundown with a small red and a larger yellow section, and b) a gradient over more than two colors, e.g. in order to add blue sky to the sundown. 

Since Calligra offers multicolor gradients, Armin and me checked how it is saved (the rendering is build-in right now). And it turns out that they hack SVG into the ODF. For the (predefined) rainbow-like gradient the style.xml looks like this:

<svg:linearGradient draw:name="gradient1" svg:spreadMethod="pad" svg:x1="0.000000%" svg:x2="100.000000%" svg:y1="0.000000%" svg:y2="100.000000%">
<svg:stop svg:offset="0" svg:stop-color="#ff0000"/><svg:stop svg:offset="0.183575" svg:stop-color="#ffe100"/><svg:stop svg:offset="0.347826" svg:stop-color="#00ff00"/><svg:stop svg:offset="0.516908" svg:stop-color="#00ffff"/><svg:stop svg:offset="0.68599" svg:stop-color="#0000ff"/><svg:stop svg:offset="0.845411" svg:stop-color="#ff00fb"/><svg:stop svg:offset="1" svg:stop-color="#ff0004"/>

As an UX evangelist I don't care too much about the implementation and have rather the workflow and interactions in mind. Ideally the multi-gradient works with all features, and not as another type next to linear, radial etc. (There might be a problem that result in this sub-optimal solution).
And finally we have to take interoperability into account as well as the conformity to the ODF specs (no idea if and how it is defined). 
So how do we make multistop/multicolor gradients possible?

PS: Suggestions on how to implement this feature in the UI are existing.
Dr. Heiko Tietze
UX Designer
Tel. +49 (0)179/1268509

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20160910/1c54f355/attachment.sig>

More information about the LibreOffice mailing list