mirror of
https://github.com/processing/processing4.git
synced 2026-01-28 19:01:08 +01:00
Moving some documentation tags about of PApplet
This commit is contained in:
@@ -12,7 +12,7 @@ PGraphics pg;
|
||||
|
||||
void setup() {
|
||||
size(640, 360);
|
||||
pg = createGraphics(400, 200, P2D);
|
||||
pg = createGraphics(400, 200);
|
||||
}
|
||||
|
||||
void draw() {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
PShape star;
|
||||
|
||||
void setup() {
|
||||
size(640, 360,P2D);
|
||||
size(640, 360, P2D);
|
||||
smooth();
|
||||
// First create the shape
|
||||
star = createShape();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user