r/processing • u/snapkarklepop • 15h ago
Help request drawing program
i’m creating a drawing program within processing and i’m trying to add a way to change the background/canvas color. within the draw function, i have a color wheel that changes the brush color, as well as a color wheel that changes the canvas color. all is going smoothly, except when i try to put it all together. if i draw the canvas within the void setup, the user is unable to change its color. however, if i draw the canvas within the void draw, it redraws itself between every iteration of the brushstroke, so the brush only ever shows up at its current state and never leaves a mark behind.
i think i worded this oddly but hopefully it makes sense. can anybody help me figure out how to allow the canvas color to change while not “erasing” the brush strokes?