allow . to start a number in svg

This commit is contained in:
Ben Fry
2022-07-30 17:37:03 -04:00
parent 9763b554f2
commit 9ef40ba48c
2 changed files with 2 additions and 2 deletions
+1 -2
View File
@@ -566,7 +566,6 @@ public class PShapeSVG extends PShape {
int i = 0;
char implicitCommand = '\0';
// char prevCommand = '\0';
boolean prevCurve = false;
float ctrlX, ctrlY;
// store values for closepath so that relative coords work properly
@@ -575,7 +574,7 @@ public class PShapeSVG extends PShape {
while (i < pathTokens.length) {
char c = pathTokens[i].charAt(0);
if (((c >= '0' && c <= '9') || (c == '-')) && implicitCommand != '\0') {
if (((c >= '0' && c <= '9') || (c == '-') || (c == '.')) && implicitCommand != '\0') {
c = implicitCommand;
i--;
} else {
+1
View File
@@ -1,4 +1,5 @@
1284 (4.0b9)
X allow . to start a number in SVG paths
_ concurrent StringDict et al