Make only part of an image transparent?

Hi,

As the title suggests, I would like to make only PART of my image transparent.

Suppose we have

myImage = display.newImage("image-path.png", 100, 100)

When one does

myImage.alpha = 0

the whole image becomes transparent.

What I would like to do is partially (e.g. rectangularly or ovally) select part of the image (and then I can set alpha = 0 for that part without affecting the rest of the image).

Is this any way to do this?

Please find the attached image below to get a better understanding of what I am trying to delineate (white area represents transparent area).

Thanks in advance!

KC

Use a mask.

https://docs.coronalabs.com/daily/api/library/graphics/newMask.html

Use a mask.

https://docs.coronalabs.com/daily/api/library/graphics/newMask.html