Reference for Processing (BETA) version 0148+. 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

draw()

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

SVG m;

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");
} 

void draw(){
  m.draw();
  m.draw(200, 200);
}
Description Draws the SVG file to the display window. By default, shapes are drawn to the upper-left corner of the display window. Use the optional x and y parameters to set the location of the SVG and the width and height to set the size. The drawMode() method allows the shape to be drawn from its center coordinate or from its corners.
Syntax
svg.draw()
svg.draw(x, y)
svg.draw(x, y, width, height)
Parameters
svg any variable of type SVG
x int or float: x-coordinate of the SVG
y int or float: y-coordinate of the SVG
width int or float: width to display the SVG
height int or float: width to display the SVG
Returns none
Usage Web & Application
Updated on September 22, 2008 11:02:03am PDT

Creative Commons License