processing.candy
Class BaseObject

java.lang.Object
  extended by processing.core.PShape
      extended by processing.candy.BaseObject
All Implemented Interfaces:
PConstants
Direct Known Subclasses:
Circle, Ellipse, Gradient, Line, Path, Poly, Rect, SVG

public class BaseObject
extends PShape


Field Summary
 
Fields inherited from interface processing.core.PConstants
ADD, ALPHA, ALPHA_MASK, ALT, AMBIENT, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BLEND, BLUE_MASK, BLUR, BOTTOM, BURN, CENTER, CENTER_RADIUS, CHATTER, CLOSE, CMYK, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ACCURATE_TEXTURES, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERROR_REPORT, DODGE, DOWN, DXF, ENABLE_ACCURATE_TEXTURES, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_2X_SMOOTH, ENABLE_OPENGL_4X_SMOOTH, ENABLE_OPENGL_ERROR_REPORT, ENTER, EPSILON, ERODE, ESC, EXCLUSION, GIF, GRAY, GREEN_MASK, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LEFT, LIGHTEST, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MOVE, MULTIPLY, NORMALIZED, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PDF, PERSPECTIVE, PI, PIXEL_CENTER, POINT, POINTS, POLYGON, POSTERIZE, PROBLEM, PROJECT, QUAD_STRIP, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RED_MASK, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPOT, SQUARE, SUBTRACT, TAB, TARGA, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, WAIT, WHITESPACE, WINDOWS
 
Constructor Summary
BaseObject(BaseObject parent, XMLElement properties)
           
 
Method Summary
 void drawImpl(PGraphics g)
          Draws the SVG document.
 PShape getChild(java.lang.String name)
          Get a particular element based on its SVG ID.
 void ignoreStyles()
          Overrides SVG-set styles and uses PGraphics styles and colors.
 void ignoreStyles(boolean state)
          Enables or disables style information (fill and stroke) set in the file.
 void print()
          Prints out the SVG document useful for parsing
 
Methods inherited from class processing.core.PShape
addChild, applyMatrix, applyMatrix, draw, draw, draw, drawMode, findChild, getChild, getChildCount, getHeight, getName, getWidth, isVisible, post, resetMatrix, rotate, rotate, rotateX, rotateY, rotateZ, scale, scale, scale, setName, setVisible, translate, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseObject

public BaseObject(BaseObject parent,
                  XMLElement properties)
Method Detail

ignoreStyles

public void ignoreStyles()
Overrides SVG-set styles and uses PGraphics styles and colors. Identical to ignoreStyles(true).


ignoreStyles

public void ignoreStyles(boolean state)
Enables or disables style information (fill and stroke) set in the file.

Parameters:
state - true to use user-specified stroke/fill, false for svg version

drawImpl

public void drawImpl(PGraphics g)
Description copied from class: PShape
Draws the SVG document.

Specified by:
drawImpl in class PShape

getChild

public PShape getChild(java.lang.String name)
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.
 // This code grabs "Layer 3" and the shapes beneath it.
 SVG layer3 = svg.get("Layer 3");
 

Overrides:
getChild in class PShape

print

public void print()
Prints out the SVG document useful for parsing