diff --git a/android/core/src/processing/core/PGraphicsAndroid2D.java b/android/core/src/processing/core/PGraphicsAndroid2D.java index d1ebc4696..3c8f6d9cf 100644 --- a/android/core/src/processing/core/PGraphicsAndroid2D.java +++ b/android/core/src/processing/core/PGraphicsAndroid2D.java @@ -1076,7 +1076,7 @@ public class PGraphicsAndroid2D extends PGraphics { PShapeSVG svg = null; if (extension.equals("svg")) { - svg = new PShapeSVG(parent, filename); + svg = new PShapeSVG(parent.loadXML(filename)); } else if (extension.equals("svgz")) { try { diff --git a/android/core/src/processing/core/PShapeSVG.java b/android/core/src/processing/core/PShapeSVG.java index 25f5dda4e..458464cc1 100644 --- a/android/core/src/processing/core/PShapeSVG.java +++ b/android/core/src/processing/core/PShapeSVG.java @@ -151,14 +151,14 @@ public class PShapeSVG extends PShape { String fillName; // id of another object - /** - * Initializes a new SVG Object with the given filename. - */ - public PShapeSVG(PApplet parent, String filename) { - // this will grab the root document, starting - // the xml version and initial comments are ignored - this(parent.loadXML(filename)); - } +// /** +// * Initializes a new SVG Object with the given filename. +// */ +// public PShapeSVG(PApplet parent, String filename) { +// // this will grab the root document, starting +// // the xml version and initial comments are ignored +// this(parent.loadXML(filename)); +// } /** @@ -206,7 +206,7 @@ public class PShapeSVG extends PShape { } - public PShapeSVG(PShapeSVG parent, XML properties, boolean parseKids) { + protected PShapeSVG(PShapeSVG parent, XML properties, boolean parseKids) { // Need to set this so that findChild() works. // Otherwise 'parent' is null until addChild() is called later. this.parent = parent; diff --git a/android/core/src/processing/opengl/PGraphics2D.java b/android/core/src/processing/opengl/PGraphics2D.java index b77d6c21e..83aaa8ab9 100644 --- a/android/core/src/processing/opengl/PGraphics2D.java +++ b/android/core/src/processing/opengl/PGraphics2D.java @@ -248,7 +248,7 @@ public class PGraphics2D extends PGraphicsOpenGL { PShapeSVG svg = null; if (extension.equals("svg")) { - svg = new PShapeSVG(pg.parent, filename); + svg = new PShapeSVG(pg.parent.loadXML(filename)); } else if (extension.equals("svgz")) { try { diff --git a/core/todo.txt b/core/todo.txt index 7b0e7dffb..a35313cd4 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -106,6 +106,9 @@ _ and how it should be handled with hash/dict _ right now using hasKey().. in JSONObject +_ add 'gz' as one of the loadXxx() options +_ helps .svgz case from being weird, also generally dealing w/ compressed data + _ image caches not being properly disposed (weak references broken?) _ http://code.google.com/p/processing/issues/detail?id=1353