I want to masking

Hello, I want masking what moves.

source : ( Hue \ Examples \ Processing.org )
int barWidth = 20;
int lastBar = -1;
int whichBar = mouseX / barWidth;
if (whichBar != lastBar) {
int barX = whichBar * barWidth;
fill(mouseY, height, height);
rect(barX, 0, barWidth, height);
lastBar = whichBar;

mask:
mask.ellipse(100,100,100,100);

I just can’t find the tutorial. Please let me know.

Hello,

Can you provide more clarity on what you are trying to do?

You tagged as Beginners and Homework and this may require some more of a skill level and advanced topics.

Please format your code as a courtesy to the community:
https://discourse.processing.org/faq#format-your-code

There are resources (tutorials, references, examples, etc.) here:
https://processing.org/https://processing.org/

And examples that come with Processing:

image

This is an “Intermediate” tutorial:
https://processing.org/tutorials/pixels/

Reference:
https://processing.org/reference/PImage_mask_.html

There are examples in the Image and Image Processing sections ready to run.

And a bit of searching… I found some good examples out there.

UPDATE 2021-07-23

This tutorial discusses PGraphics:
https://processing.org/tutorials/rendering/
Reference:
https://processing.org/reference/PGraphics.html

:)