-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
In Svg, properties with numerical values can be represented as floats or ints. An Svg file can set properties to a value that's out of an int or float limit. In this case, those values should be stored in a larger variable and kept like this during any intermediate operations. Only when the rendering step happens, the renderer, depending on the device capabilities, can clamp those values. The resulting behaviour might be different across different renderers.
https://www.w3.org/TR/SVG/types.html#RangeClamping
In the case of Qt Svg, which uses QPainter, the values should be checked if they are within the range of QT_RASTER_COORD_LIMIT. This should be a proper check since QPainter does not guarantee the rendering results will be correct outside of this limit.
This problem existed since Qt 5.15, and it was only noticeable in Qt 6.10 debug builds since the geometry classes started using QCheckedInt internally which fires an assertion in debug builds.