Offset uniqueness in vector of ColorSteps

Armin Le Grand armin_le_grand at me.com
Wed Mar 15 14:43:25 UTC 2023


Hi Regina,

On 3/15/23 15:07, Regina Henschel wrote:
> Hi Armin,
>
> Armin Le Grand schrieb am 15.03.2023 um 10:54:
>> Hi Regina,
>>
>> thought about it deeper, and it's even getting stranger quickly. Let 
>> me express my thoughts about possible problems. I will use an 
>> example: A ColorStop sequence of four colors, (a..d)o for offset, 
>> (a..d)c for the color. So let's look at
>>
>>      1) ao = 0%, ac
>>      2) bo = 50%, bc
>>      3) co = 50%, cc
>>      4, do = 100%, dc
>>
>> The order these should be used is defined by the offsets.
>
> The order is defined by the order of the <stop> elements in the SVG 
> (and ODF) markup. If offsets do not follow this order they have to be 
> adjusted on reading the markup. Rules for that are described in
> 13.2.4 SVG 1.1 (Second Edition) https://www.w3.org/TR/SVG11/
> or
> 14.2.4 SVG 2 (Editors Draft)
> https://svgwg.org/svg2-draft/pservers.html#StopNotes
Ah, thanks! That's what I was looking for - I was not sure if it is 
allowed to use the order in markup at all.
>
> So the order of stops with identical offset is given by the order of 
> them in markup and after reading the markup as order in your vector. 
> The import filter are responsible to generate the correct vector. And 
> painting must use the order inside the vector.
>
> So in your example the vector would always contain 
> (0%|ac),(50%|bc),(50%|cc),(100%|dc) and that will generate smooth 
> transition from ac to bc, then abrupt change from bc to cc, followed 
> by smooth transition from cc to dc.
>
> There is no ambiguity.
Okay, then I will use it like that - and hope everyone defining/using 
these is aware of this (!)
>
> Kind regards,
> Regina
Thanks and regards,
     Armin

-- 
--
ALG (PGP: EE1C 4B3F E751 D8BC C485 DEC1 3C59 F953 D81C F4A2)



More information about the LibreOffice mailing list