Opened 5 years ago
Closed 3 years ago
Last modified 3 years ago
#14210 closed bug (fixed)
Incorrect order of gradient stops in SVG export
|Reported by:||joshas||Owned by:||stippi|
Icon-O-Matic SVG export produces invalid gradients. Citing SVG specification on gradient stops:
Each gradient offset value is required to be equal to or greater than the previous gradient stop's offset value. https://www.w3.org/TR/SVG11/pservers.html#GradientStops
This results in exported SVG being rendered incorrectly.
Change History (6)
comment:1 by , 5 years ago
|Platform:||x86-64 → All|
comment:2 by , 5 years ago
I look at the code and the gradient stops are sorted... Do you have an example of an icon that produce a wrong stop offset order?
comment:3 by , 5 years ago
One example is App_Finance icon from Haiku repository (/haiku/tree/data/artwork/icons/). When exported to SVG some linearGradient stops are in incorrect order. Notice that stops offsets start at 1 and goes down to 0. They should be in ascending order.
<linearGradient id="gradient6" gradientUnits="userSpaceOnUse" x1="23.07" y1="40.59" x2="27.13" y2="45"> <stop offset="1" stop-color="#ffffff"/> <stop offset="0.4497" stop-color="#ffacac"/> <stop offset="0" stop-color="#a72323"/> </linearGradient>
comment:4 by , 5 years ago
The plot thickens, even the FlatIconImporter uses the function that sort the offset... Strange that opening the svg version and exporting again solve the order problem.
comment:5 by , 3 years ago
|Status:||new → closed|
Fixed in hrev54487.
comment:6 by , 3 years ago
|Milestone:||Unscheduled → R1/beta3|
Assign fix to milestone:R1/beta3, as it looks like this fix will be part of that release.
As we started with the previous beta, we would like to use the Milestone field for fixed tickets to log from which release the improvement will be out. Therefore it is very much appreciated to assign the milestone when closing a ticket as
Not a platform-specific issue.