Search processing.org:

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

### ignoreStyles()

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() {
      background(204);
      m.ignoreStyles();
      m.draw();
      m.ignoreStyles(false);
      fill(0, 90, 120);
      m.draw(0, 100);
    }

Description

When no parameter is used, this function overrides the SVG's fill and stroke attributes and uses Processing styles and colors to draw the SVG. The function has one optional parameter to enable and disable the original SVG's fill and stroke attributes. If the state parameter is false, it will display the embedded SVG styles and if the state parameter is true, it will ignore the SVG's fill and stroke values.

Syntax

    svg.ignoreStyles()
    svg.ignoreStyles(state)

Parameters

svg | any variable of type SVG
state | false or true

Usage | Web & Application

Updated on February 09, 2008 04:38:52pm PST