|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object processing.core.PShape
public class PShape
In-progress class to handle shape data, currently to be considered of alpha or beta quality. Major structural work may be performed on this class after the release of Processing 1.0. Such changes may include:
For the time being, this class and its shape() and loadShape() friends in PApplet exist as placeholders for more exciting things to come. If you'd like to work with this class, make a subclass (see how PShapeSVG works) and you can play with its internal methods all you like.
Library developers are encouraged to create PShape objects when loading shape data, so that they can eventually hook into the bounty that will be the PShape interface, and the ease of loadShape() and shape().
Field Summary | |
---|---|
static int |
BEZIER_VERTEX
|
static int |
BREAK
|
static int |
CURVE_VERTEX
|
static int |
GEOMETRY
Collections of vertices created with beginShape(). |
static int |
GROUP
Generic, only draws its child objects. |
float |
height
|
static int |
PATH
A series of vertex, curveVertex, and bezierVertex calls. |
static int |
PRIMITIVE
A line, ellipse, arc, image, etc. |
static int |
VERTEX
|
float |
width
|
Constructor Summary | |
---|---|
PShape()
|
|
PShape(int family)
|
Method Summary | |
---|---|
void |
addChild(PShape who)
|
void |
apply(PMatrix3D source)
|
void |
applyMatrix(float n00,
float n01,
float n02,
float n10,
float n11,
float n12)
|
void |
applyMatrix(float n00,
float n01,
float n02,
float n03,
float n10,
float n11,
float n12,
float n13,
float n20,
float n21,
float n22,
float n23,
float n30,
float n31,
float n32,
float n33)
|
void |
applyMatrix(PMatrix source)
|
void |
applyMatrix(PMatrix2D source)
|
void |
disableStyle()
Overrides this shape's style information and uses PGraphics styles and colors. |
void |
draw(PGraphics g)
Called by the following (the shape() command adds the g) PShape s = loadShapes("blah.svg"); shape(s); |
void |
drawImpl(PGraphics g)
Draws the SVG document. |
void |
enableStyle()
Re-enables style information (fill and stroke) set in the shape. |
PShape |
findChild(java.lang.String target)
Same as getChild(name), except that it first walks all the way up the hierarchy to the farthest parent, so that children can be found anywhere. |
PShape |
getChild(int index)
|
PShape |
getChild(java.lang.String target)
|
int |
getChildCount()
|
float |
getHeight()
Get the height of the drawing area (not necessarily the shape boundary). |
java.lang.String |
getName()
|
float |
getWidth()
Get the width of the drawing area (not necessarily the shape boundary). |
boolean |
isVisible()
|
void |
post(PGraphics g)
|
void |
resetMatrix()
|
void |
rotate(float angle)
|
void |
rotate(float angle,
float v0,
float v1,
float v2)
|
void |
rotateX(float angle)
|
void |
rotateY(float angle)
|
void |
rotateZ(float angle)
|
void |
scale(float s)
|
void |
scale(float sx,
float sy)
|
void |
scale(float x,
float y,
float z)
|
void |
setName(java.lang.String name)
|
void |
setVisible(boolean visible)
|
void |
translate(float tx,
float ty)
|
void |
translate(float tx,
float ty,
float tz)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int GROUP
public static final int PRIMITIVE
public static final int PATH
public static final int GEOMETRY
public float width
public float height
public static final int VERTEX
public static final int BEZIER_VERTEX
public static final int CURVE_VERTEX
public static final int BREAK
Constructor Detail |
---|
public PShape()
public PShape(int family)
Method Detail |
---|
public void setName(java.lang.String name)
public java.lang.String getName()
public boolean isVisible()
public void setVisible(boolean visible)
public void disableStyle()
public void enableStyle()
public float getWidth()
public float getHeight()
public void post(PGraphics g)
public void draw(PGraphics g)
public void drawImpl(PGraphics g)
public int getChildCount()
public PShape getChild(int index)
public PShape getChild(java.lang.String target)
public PShape findChild(java.lang.String target)
public void addChild(PShape who)
public void translate(float tx, float ty)
public void translate(float tx, float ty, float tz)
public void rotateX(float angle)
public void rotateY(float angle)
public void rotateZ(float angle)
public void rotate(float angle)
public void rotate(float angle, float v0, float v1, float v2)
public void scale(float s)
public void scale(float sx, float sy)
public void scale(float x, float y, float z)
public void resetMatrix()
public void applyMatrix(PMatrix source)
public void applyMatrix(PMatrix2D source)
public void applyMatrix(float n00, float n01, float n02, float n10, float n11, float n12)
public void apply(PMatrix3D source)
public void applyMatrix(float n00, float n01, float n02, float n03, float n10, float n11, float n12, float n13, float n20, float n21, float n22, float n23, float n30, float n31, float n32, float n33)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |