Moving some documentation tags about of PApplet

This commit is contained in:
Casey Reas
2012-09-04 00:27:00 +00:00
parent 7e70c81040
commit ebb25d8a45
6 changed files with 20 additions and 39 deletions

View File

@@ -12,7 +12,7 @@ PGraphics pg;
void setup() {
size(640, 360);
pg = createGraphics(400, 200, P2D);
pg = createGraphics(400, 200);
}
void draw() {

View File

@@ -9,7 +9,7 @@
PShape star;
void setup() {
size(640, 360,P2D);
size(640, 360, P2D);
smooth();
// First create the shape
star = createShape();

View File

@@ -13,7 +13,7 @@ void setup() {
smooth();
// Creating the PShape as an ellipse
// The corner is -50,-50 so that the center is at 0,0
circle = createShape(RECT,-50,-25,100,50);
circle = createShape(RECT, -50, -25, 100, 50);
}
void draw() {
@@ -21,7 +21,7 @@ void draw() {
// We can dynamically set the stroke and fill of the shape
circle.stroke(255);
circle.strokeWeight(4);
circle.fill(map(mouseX,0,width,0,255));
circle.fill(map(mouseX, 0, width, 0, 255));
// We can use translate to move the PShape
translate(mouseX, mouseY);
// Drawing the PShape