Problems loading and display SVG

edited October 2016 in Questions about Code

Hi all,

I am trying to run the SVG example from Examples>Shape>LoadDisplaySVG in a folder in my home directory. I am running on Arch Linux Processing 3.1.1. The SVG file is in the ./data folder and properly named.

PShape s;

void setup() {
  s = loadShape("test.svg");
}

void draw() {
  shape(s, 10, 10, 80, 80);
}

From Debug I get the following:

Ignoring <svg:metadata> tag.
Ignoring <svg:defs> tag.
Ignoring <svg:g> tag.
Exception in thread "Animation Thread" java.lang.RuntimeException: The root node is not <svg>, it's <svg:svg>
    at processing.core.PShapeSVG.<init>(PShapeSVG.java:123)
    at processing.awt.PShapeJava2D.<init>(PShapeJava2D.java:52)
    at processing.awt.PGraphicsJava2D.loadShape(PGraphicsJava2D.java:1826)
    at processing.core.PGraphics.loadShape(PGraphics.java:1740)
    at processing.core.PApplet.loadShape(PApplet.java:11048)
    at test_svg.setup(test_svg.java:20)
    at processing.core.PApplet.handleDraw(PApplet.java:2378)
    at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1527)
    at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)
Tagged:
Sign In or Register to comment.