PGraphics
Data / CompositeDescription
An off-screen graphics buffer. Create with createGraphics(). Draw into it with beginDraw()/endDraw(), then display with image().
Syntax
PGraphics* pg = createGraphics(w, h)
Parameters
None
Returns
PGraphicsMethods
| beginDraw() | Start drawing to the buffer |
| endDraw() | Stop drawing to the buffer |
| background(r,g,b) | Clear the buffer |
| fill(r,g,b) | Set fill color |
| stroke(r,g,b) | Set stroke color |
| ellipse(x,y,w,h) | Draw ellipse |
| rect(x,y,w,h) | Draw rectangle |
Related
Under the Hood
Implementation in Processing.h / Processing.cpp:
Loading...