Closed MewPurPur closed 8 months ago
The number is 2048 * sqrt(2)
Looks like an issue with ThorVG, I just tried your svg code from above in their web viewer https://thorvg.github.io/thorvg.viewer/ and the gradient stops rendering at a certain size if you use the size slider to scale it up/down.
Makes sense, I didn't know the upscaling was on their end. If this hasn't been reported there yet I'll do so in a bit.
Tested versions
The entire lifespan of Image.load_svg() functions, which were introduced in 4.2
System information
Godot v4.2.1.stable - Pop!_OS 22.04 LTS - X11 - GLES3 (Compatibility) - Mesa Intel(R) Graphics (ADL GT2) () - 12th Gen Intel(R) Core(TM) i5-1235U (12 Threads)
Issue description
When a SVG has a gradient bigger than 2896.309 units, any amount of scaling passed when it's loaded will break it. That is, if you upscale the SVG 10 times, you can't have gradients bigger than 289.6309 pixels for example. If you use such a gradient on a shape, it won't display.
Steps to reproduce
Here's the result from this (ignore the background noise):
Minimal reproduction project (MRP)
No need to follow project files, just copy the above code inside a Node2D or a Control.