Skip to content

Commit 3a799e1

Browse files
committed
fix svg e notation problem (bug processing#1408)
1 parent 392ba19 commit 3a799e1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

core/src/processing/core/PShapeSVG.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,11 @@ protected void parsePath() {
457457
separate = false;
458458
}
459459
if (c == '-' && !lastSeparate) {
460-
pathBuffer.append("|");
460+
// allow for 'e' notation in numbers, e.g. 2.10e-9
461+
// http://dev.processing.org/bugs/show_bug.cgi?id=1408
462+
if (i == 0 || pathDataChars[i-1] != 'e') {
463+
pathBuffer.append("|");
464+
}
461465
}
462466
if (c != ',') {
463467
pathBuffer.append(c); //"" + pathDataBuffer.charAt(i));

core/todo.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
0174 core (private)
2-
X no changes
2+
X svg paths that use 'e' (exponent) not handled properly
3+
X http://dev.processing.org/bugs/show_bug.cgi?id=1408
34

5+
_ consider bringing back text/image using cache/names
6+
_ fonts might not be as bad
47

58
_ open up the pdf library more (philho)
69
_ http://dev.processing.org/bugs/show_bug.cgi?id=1343

0 commit comments

Comments
 (0)