Hi Lore,
I assume @kfrajer was just giving an example.
The problem is with this line:
circles.myArc(mouseX, mouseY);
You can’t do that because myArc()
was never implemented in the PGraphics class since you code it yourself.
The solution that @kfrajer gave you was to pass on you PGraphic as an argument of your myArc()
function so you can keep drawing on it.
Now since you declared your PGraphics as a global variable you should not even have to pass it with an argument. You can just drop the circles.
and just use myArc(mouseX, mouseY)
. You will need to get rid of circles.beginDraw();
and circles.endDraw();
though since you are already calling them outside of your function.