Reference for Processing (BETA) version 0135+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Class

SVG

Name

get()

Examples
import processing.candy.*;
import processing.xml.*;

SVG m, layer;

void setup(){
  size(400,400);
  // The file "moo.svg" must be in the data folder
  // of the current sketch to load successfully
  m = new SVG(this, "moo.svg");
  // Grabs "Layer 3" and the shapes beneath it.
  layer = m.get("Layer 3");
} 

void draw(){
  layer.draw();
}
Description Get a particular element based on its SVG ID. When editing SVG by hand, this is the id="" tag on any SVG element. When editing from Illustrator, these IDs can be edited by expanding the layers palette. The names used in the layers palette, both for the layers or the shapes and groups beneath them can be used here.
Syntax
svg.get(name)
Parameters
svg any variable of type SVG
name String: the name of the SVG layer to get
Usage Web & Application
Updated on May 28, 2007 10:52:20am PDT

Creative Commons License