From 342a945e04c619e0fe27afa442f48d9a7b2d1fb3 Mon Sep 17 00:00:00 2001 From: benfry Date: Fri, 4 Dec 2009 23:18:53 +0000 Subject: [PATCH] fix svg e notation problem (bug #1408) --- core/src/processing/core/PShapeSVG.java | 6 +++++- core/todo.txt | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/src/processing/core/PShapeSVG.java b/core/src/processing/core/PShapeSVG.java index db1bd9e88..0bbf2c51a 100644 --- a/core/src/processing/core/PShapeSVG.java +++ b/core/src/processing/core/PShapeSVG.java @@ -457,7 +457,11 @@ public class PShapeSVG extends PShape { separate = false; } if (c == '-' && !lastSeparate) { - pathBuffer.append("|"); + // allow for 'e' notation in numbers, e.g. 2.10e-9 + // http://dev.processing.org/bugs/show_bug.cgi?id=1408 + if (i == 0 || pathDataChars[i-1] != 'e') { + pathBuffer.append("|"); + } } if (c != ',') { pathBuffer.append(c); //"" + pathDataBuffer.charAt(i)); diff --git a/core/todo.txt b/core/todo.txt index 2eef95a32..33df4a364 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,6 +1,9 @@ 0174 core (private) -X no changes +X svg paths that use 'e' (exponent) not handled properly +X http://dev.processing.org/bugs/show_bug.cgi?id=1408 +_ consider bringing back text/image using cache/names +_ fonts might not be as bad _ open up the pdf library more (philho) _ http://dev.processing.org/bugs/show_bug.cgi?id=1343