# I want to masking

**URL:** https://discourse.processing.org/t/i-want-to-masking/31382
**Category:** Beginners
**Tags:** homework
**Created:** [July 22, 2021, 12:31pm UTC](https://discourse.processing.org/t/i-want-to-masking/31382 "2021-07-22T12:31:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jih](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jih](https://discourse.processing.org/u/jih)
#### Post date: [July 22, 2021, 12:31pm UTC](https://discourse.processing.org/t/i-want-to-masking/31382/1 "2021-07-22T12:31:44Z")

</div>

Hello, I want masking what moves.

source : ( [Hue \ Examples \ Processing.org](https://processing.org/examples/hue.html) )  
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.

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [July 22, 2021, 2:16pm UTC](https://discourse.processing.org/t/i-want-to-masking/31382/2 "2021-07-22T14:16:23Z")

</div>

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](https://discourse.processing.org/faq#format-your-code)

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

And examples that come with Processing:

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/74f47a1e3026fa826143c89baa41f9da8ddb9ac8.png)

This is an “Intermediate” tutorial:  
[https://processing.org/tutorials/pixels/](https://processing.org/tutorials/pixels/)

Reference:  
[https://processing.org/reference/PImage\_mask\_.html](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/](https://processing.org/tutorials/rendering/)  
Reference:  
[https://processing.org/reference/PGraphics.html](https://processing.org/reference/PGraphics.html)

`:)`
