kieler / klighd-vscode

Eclipse Public License 2.0
8 stars 6 forks source link

Gradient in SVG support broken #38

Closed soerendomroes closed 2 years ago

soerendomroes commented 2 years ago

It seems to be the case that the gradient in the SCCharts visualization is not correctly exported. At least, if the file is opened in inkscape this is not the case.

To check:

What happens if SCChart is exported to svg in KIELER and VSCode

Do they look the same? How about opening them in inkscape How about exporting them to pdf via inkscape cli?

Eddykasp commented 2 years ago

To expand on this issue: the problem doesn't happen upon opening the svg in Inkscape (or other svg viewers), but only once certain operations in inkscape are performed. For example resizing the image triggers it. This may be a problem in Inkscape.

Eddykasp commented 2 years ago

Issue for Inkscape

Eddykasp commented 2 years ago

The issue is already known Issue 2956

A potential temporary fix could be to define the gradients differently:

If you replace gradientTransform="rotate(90)" with x1="0" x2="0" y1="0" y2="1" it appears to work fine

maybe @NiklasRentzCAU has some input on whether changing this in the rendering is worth the effort?

NiklasRentzCAU commented 2 years ago

Thanks for that hint, #69 will work around the issue in Inkscape and use the gradient coordinates instead of the gradient angle definitions.