Commit Graph

4 Commits

Author SHA1 Message Date
Kliment 327956ae27 nanosvg: Fix nanosvg default stroke width to assume 0 instead of 1px
Nanosvg assumes that an unspecified stroke width is 1px, whereas the SVG
specification specifies it should be read as 0px. This causes problems
when scaling factors are applied to 0px lines, leading to them being
misinterpeted by our import.

This commit fixes the nanosvg assumption by setting the initial stroke
width to 0 instead of 1px.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13353
2023-01-31 20:34:25 +00:00
jean-pierre charras 85e44c2dae pcbnew, SVG import: fix an issue for SVG files using a CR+LF end of file
The issue was in a validity test working only if CR+LF is not replaced by LF
Fixes #10096
https://gitlab.com/kicad/code/kicad/issues/10096
2022-11-09 09:33:51 +01:00
Ian McInerney 2becd368d9 Thirdparty: Properly handle error condition in nanosvg
ftell() returns -1 on an error, so it must be a long return
type, and we should test for its failure.

(found by Coverity)
2020-09-20 22:39:31 +01:00
Ian McInerney 116ac9aa75 Move dxflib, tinyspline and nanosvg into a thirdparty library directory
Part of fixing https://gitlab.com/kicad/code/kicad/issues/3637
2019-12-19 17:41:02 +00:00