Hi - I had put a feedback/feature request in a bunch of months back that seems like it would be something that would be added to Graphics 2.0. Was this added? Or could it be?
The text from my original request is below:
A simple boolean property to enable or disable automatic masking for a display object or item from a sprite sheet.
The API would automatically calculate that if the png has transparent areas, those areas should be masked out (not seen OR avail for touch/tap/etc), and any areas not 100% transparent (alpha 0) are show and available for touch/tap, etc in only that area.
Having to create a separate mask file for a png that already has transparency data in it seems redundant and a lot of extra work. If it has a transparent area around a shape than clearly (probably 95% of the time) the intention is for that transparent area to not be seen OR be touchable.
Something like:
object.isAutoMask = true
- or -
object:setAutoMask()
That way we can add an object, set the automask to true, and we’d have touch events only trigger when touching non-transparent sections on the image - with one image and 1 line of code.
This could also be carried forward and available for physics as well, where the boundaries of the masked portions act as physics shapes automatically as well. That would be double bonus!
object.isAutoPhysicsShape = true
- or -
object:setAutoPhysicsShape()
Would be a huge time saver! Please!!??