size(100, 100) pg = createGraphics(40, 40) pg.beginDraw() pg.background(100) pg.stroke(255) pg.line(20, 20, mouseX, mouseY) pg.endDraw() image(pg, 9, 30) image(pg, 51, 30)
|Description||Main graphics and rendering context, as well as the base API implementation for processing "core". Use this class if you need to draw into an off-screen graphics buffer. A PGraphics object can be constructed with the createGraphics() function. The beginDraw() and endDraw() methods (see above example) are necessary to set up the buffer and to finalize it. The fields and methods for this class are extensive. For a complete list, visit the developer's reference.|
Updated on Mon Sep 21 15:53:25 2020.
If you see any errors or have comments, please let us know.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License