add XMLElement constructor for SVG

This commit is contained in:
benfry
2008-05-21 14:28:28 +00:00
parent 89ca54ab74
commit 3ebf0eb8e4
3 changed files with 13 additions and 5 deletions

View File

@@ -157,12 +157,18 @@ public class SVG {
* Initializes a new SVG Object with the given filename.
*/
public SVG(PApplet parent, String filename) {
this.parent = parent;
//this.filename = filename;
// this will grab the root document, starting <svg ...>
// the xml version and initial comments are ignored
svg = new XMLElement(parent, filename);
this(parent, new XMLElement(parent, filename));
}
/**
* Initializes a new SVG Object with the given filename.
*/
public SVG(PApplet parent, XMLElement svg) {
this.parent = parent;
this.svg = svg;
if (!svg.getName().equals("svg")) {
throw new RuntimeException("root is not <svg>, it's <" + svg.getName() + ">");

View File

@@ -26,6 +26,8 @@ X load and save tga results in upside down tga
X http://dev.processing.org/bugs/show_bug.cgi?id=742
X fix problem with g.smooth always returning false in JAVA2D
X http://dev.processing.org/bugs/show_bug.cgi?id=762
X add XMLElement (not filename) constructor to SVG lib
X http://dev.processing.org/bugs/show_bug.cgi?id=773
_ should we do joins when alpha is turned off?
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=OpenGL;action=display;num=1210007450

View File

@@ -25,7 +25,7 @@ o prolly need to have a param for this guy
X switch to nanoxml instead of nanoxml-lite (29k vs. 5k)
X check against ods
X http://dev.processing.org/bugs/show_bug.cgi?id=757
X Space after OPENGL param breaks export
X space after OPENGL param breaks export
X http://dev.processing.org/bugs/show_bug.cgi?id=769
_ change export to point to java 1.5 installation