Using void in PGraphics

It works, but does not have the intended effect. In my full code, I want to only draw the arc when the mouse is pressed. This makes it draw when the mouse isn’t pressed.