use a function (or a class) in a PGraphic
in
Programming Questions
•
2 years ago
I want to use a function (or a class) in a PGraphic, is this possible?
Cause this aint working:
Cause this aint working:
- PGraphics pg = createGraphics(200, 200, P2D);
void setup(){
noLoop();
}
void draw(){
pg.beginDraw();
pg.myFunction(10, 10, 50, 50);
pg.endDraw();
}
void myFunction(int x, int y, int t_width, int t_height){
rect(x, y, t_width, t_height);
}
1
