From 0ecb83b29803c19609dd36b9afbcdf9e3093ad55 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 1 Jul 2018 10:45:47 +0000 Subject: Update bundled nanosvg lib to latest upstream version. $ git log -2 master commit 06c1f0f3bb041d69a73bb74067d063a700215b0e Merge: 1f17a7e d6eabf2 Author: Mikko Mononen Date: Sat Apr 14 06:50:42 2018 +0300 Merge pull request #116 from porglezomp-misc/master Parse percentage width for automatic sizing commit d6eabf29c9c10038924e823e693dddef281abee5 Author: Caleb Jones Date: Fri Apr 13 19:57:06 2018 -0400 Parse percentage width for automatic sizing Instead of calculating percentage coordinates relative to 1px, we calculate them relative to 0px width, that way an explicit will be converted to and trigger the bounding-box sizing calculation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- README.bundled-libs.txt | 2 +- nanosvg/nanosvg.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.bundled-libs.txt b/README.bundled-libs.txt index 1c27da929..f5e736fc3 100644 --- a/README.bundled-libs.txt +++ b/README.bundled-libs.txt @@ -17,7 +17,7 @@ Current versions of bundled libraries: Library Version Release date FLTK Version ------------------------------------------------------------------ jpeg jpeg-9c 2018-01-14 1.4.0 - nanosvg [2017-07-09] n.a. 1.4.0 + nanosvg [2018-07-01] [06c1f0f] 1.4.0 png libpng-1.6.34 2017-09-29 1.4.0 zlib zlib-1.2.11 2017-01-15 1.4.0 diff --git a/nanosvg/nanosvg.h b/nanosvg/nanosvg.h index 0426b0c3f..9e304d57c 100644 --- a/nanosvg/nanosvg.h +++ b/nanosvg/nanosvg.h @@ -1658,7 +1658,7 @@ static char nsvg__parseLineJoin(const char* str) else if (strcmp(str, "bevel") == 0) return NSVG_JOIN_BEVEL; // TODO: handle inherit. - return NSVG_CAP_BUTT; + return NSVG_JOIN_MITER; } static char nsvg__parseFillRule(const char* str) @@ -2502,9 +2502,9 @@ static void nsvg__parseSVG(NSVGparser* p, const char** attr) for (i = 0; attr[i]; i += 2) { if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) { if (strcmp(attr[i], "width") == 0) { - p->image->width = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 1.0f); + p->image->width = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 0.0f); } else if (strcmp(attr[i], "height") == 0) { - p->image->height = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 1.0f); + p->image->height = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 0.0f); } else if (strcmp(attr[i], "viewBox") == 0) { sscanf(attr[i + 1], "%f%*[%%, \t]%f%*[%%, \t]%f%*[%%, \t]%f", &p->viewMinx, &p->viewMiny, &p->viewWidth, &p->viewHeight); } else if (strcmp(attr[i], "preserveAspectRatio") == 0) { -- cgit v1.2.3