summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2018-07-01 10:45:47 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2018-07-01 10:45:47 +0000
commit0ecb83b29803c19609dd36b9afbcdf9e3093ad55 (patch)
treea08691774220e6e5c0a78d78ac0cbe74e0a3e0d1
parent7483651aaa980e0479d512aac1e77e6cddb7fc0d (diff)
Update bundled nanosvg lib to latest upstream version.
$ git log -2 master commit 06c1f0f3bb041d69a73bb74067d063a700215b0e Merge: 1f17a7e d6eabf2 Author: Mikko Mononen <memononen@gmail.com> Date: Sat Apr 14 06:50:42 2018 +0300 Merge pull request #116 from porglezomp-misc/master Parse <svg> percentage width for automatic sizing commit d6eabf29c9c10038924e823e693dddef281abee5 Author: Caleb Jones <code@calebjones.net> Date: Fri Apr 13 19:57:06 2018 -0400 Parse <svg> percentage width for automatic sizing Instead of calculating percentage coordinates relative to 1px, we calculate them relative to 0px width, that way an explicit <svg width="100%"> will be converted to <svg width="0px"> and trigger the bounding-box sizing calculation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--README.bundled-libs.txt2
-rw-r--r--nanosvg/nanosvg.h6
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) {