In Setup I’ve got a gradient being applied to the entire canvas.
In Draw, I’m drawing some lines using a wide strokeWeight. I’d like to be able to erase part of the line and have the gradient below show through. Is there a way to erase only the line and not the underlying background that was drawn in Setup?
I haven’t tried yet, but I’m thinking I might be able to use createCanvas to draw the lines on a second canvas and erase them there.
As in this example, creating the letter ‘B’ from lines and attempting to erase a triangular shape on the right edge, but the erase function erases the background too.