Multiple canvases

How do I get passed the following problem.

I want to use PGraphics to create multiple canvases so that I can have proper overflow control on my menus however the following happens

note the rectangle square in the background of the two tabs. Although I am creating a new canvas for both they all share the same canvas.

Would using a mask fix the issue?

Also is there a reson creatCanvas doesnt work with FX2D? If i use it i get an null exception error when calling canvas.beginDraw().

1 Like

Problem found in code, canvases aren’t shared, it because I was calling


where mouse was a PVector recalculating mouse based on the x and y of the canvas, therefore all instance of canvas will draw a rect and it will appear that it is on all canvases.

1 Like