|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectprocessing.core.PImage
processing.core.PGraphics
processing.core.PGraphics2D
public class PGraphics2D
Subclass of PGraphics that handles fast 2D rendering, more commonly referred to as P2D. This class uses no Java2D and will run with Java 1.1.
| Field Summary |
|---|
| Fields inherited from class processing.core.PImage |
|---|
cache, format, height, imageMode, modified, mx1, mx2, my1, my2, parent, pixels, smooth, width |
| Constructor Summary | |
|---|---|
PGraphics2D(int iwidth,
int iheight,
PApplet applet)
|
|
| Method Summary | |
|---|---|
static int |
_blend(int p1,
int p2,
int a2)
|
void |
beginDraw()
Prepares the PGraphics for drawing. |
void |
beginShape(int kind)
Start a new shape. |
void |
bezier(float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4)
|
void |
curve(float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4)
|
void |
ellipseImpl(float x1,
float y1,
float w,
float h)
|
void |
endDraw()
This will finalize rendering so that it can be shown on-screen. |
void |
endShape(int mode)
|
void |
vertex(float x,
float y)
|
void |
vertex(float x,
float y,
float z)
|
void |
vertex(float x,
float y,
float u,
float v)
|
void |
vertex(float x,
float y,
float z,
float u,
float v)
|
| Methods inherited from class processing.core.PImage |
|---|
blend, blend, blendColor, clone, copy, copy, filter, filter, get, get, get, imageMode, init, loadPixels, noSmooth, save, set, set, smooth, updatePixels, updatePixels |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PGraphics2D(int iwidth,
int iheight,
PApplet applet)
| Method Detail |
|---|
public void beginDraw()
PGraphics
beginDraw in class PGraphicspublic void endDraw()
PGraphics
endDraw in class PGraphicspublic void beginShape(int kind)
PGraphicsDifferences between beginShape() and line() and point() methods.
beginShape() is intended to be more flexible at the expense of being a little more complicated to use. it handles more complicated shapes that can consist of many connected lines (so you get joins) or lines mixed with curves.
The line() and point() command are for the far more common cases (particularly for our audience) that simply need to draw a line or a point on the screen.
From the code side of things, line() may or may not call beginShape() to do the drawing. In the beta code, they do, but in the alpha code, they did not. they might be implemented one way or the other depending on tradeoffs of runtime efficiency vs. implementation efficiency &mdash meaning the speed that things run at vs. the speed it takes me to write the code and maintain it. for beta, the latter is most important so that's how things are implemented.
beginShape in class PGraphics
public void vertex(float x,
float y)
vertex in class PGraphics
public void vertex(float x,
float y,
float u,
float v)
vertex in class PGraphics
public void vertex(float x,
float y,
float z)
vertex in class PGraphics
public void vertex(float x,
float y,
float z,
float u,
float v)
vertex in class PGraphicspublic void endShape(int mode)
endShape in class PGraphics
public void ellipseImpl(float x1,
float y1,
float w,
float h)
public void bezier(float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4)
bezier in class PGraphics
public void curve(float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4)
curve in class PGraphics
public static final int _blend(int p1,
int p2,
int a2)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||