Alex Shvartzkop
64a64f5216
NanoSVG: parse 'class' attribute before 'style'.
2 years ago
Alex Shvartzkop
2c07866fff
NanoSVG: update image size to the actual size after scaling.
2 years ago
Alex Shvartzkop
c64b44913c
NanoSVG: change preserveAspectRatio default to "xMidYMid meet".
2 years ago
Alex Shvartzkop
2cd7c0636f
NanoSVG: basic support for stylesheets.
Based on https://github.com/memononen/nanosvg/pull/175
2 years ago
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
3 years ago
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
3 years ago
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)
5 years ago
Ian McInerney
116ac9aa75
Move dxflib, tinyspline and nanosvg into a thirdparty library directory
Part of fixing https://gitlab.com/kicad/code/kicad/issues/3637
6 years ago
Seth Hillbrand
4d2e953f42
Cleanup: Replace C-only deprecated headers
This replaces headers deprecated by C++14 with their equivalent
replacement
6 years ago
jean-pierre charras
5b3202d8f3
dxf and svg import: accept unicode filenames
Fixes: lp:1805613
https://bugs.launchpad.net/kicad/+bug/1805613
7 years ago
jean-pierre charras
fb5b5ff7c3
nanosvg: Update nanosvg. Move the code to compile from nanosvg.h to nanosvg.cpp
Uncrustify this code.
7 years ago
jean-pierre charras
74a9d5401a
Import svg import code from experimental trunk: start point
7 years ago