Commit Graph

8 Commits

Author SHA1 Message Date
Alex Shvartzkop 64a64f5216 NanoSVG: parse 'class' attribute before 'style'. 2023-10-09 07:04:50 +03:00
Alex Shvartzkop 2c07866fff NanoSVG: update image size to the actual size after scaling. 2023-09-07 10:57:02 +03:00
Alex Shvartzkop c64b44913c NanoSVG: change preserveAspectRatio default to "xMidYMid meet". 2023-09-02 22:06:32 +03:00
Alex Shvartzkop 2cd7c0636f NanoSVG: basic support for stylesheets.
Based on https://github.com/memononen/nanosvg/pull/175
2023-09-02 19:17:31 +03:00
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