Hello all,
Was wondering if I could get some help on this… I have two images, one is the icon and one is the mask. The mask seems to follow the rules specified in http://docs.coronalabs.com/guide/media/imageMask/index.html
Code:
local icon = display.newImageRect("assets/images/HUD/Heart\_1.png", 64, 64); icon.x = \_w; icon.y = \_h; local mask = graphics.newMask("assets/images/HUD/Heart\_2.png"); icon:setMask(mask); icon.maskX = \_w; icon.maskY = \_h;
The image and mask are the same size as well. However, the icon completely disappears once the mask is applied. I’ve tried repositioning the mask different ways, as maybe it was being offset in an odd way, but it doesn’t seem to help. I tried scaling the mask to make it huge, and maybe determine how it was being offset (if it was) but this still did not help (I also did the opposite, scaled the image huge to see where the mask might be, but nothing showed). The image displays fine when the mask isn’t applied. What could be wrong? I’ve even tried doing this in graphics version 1 and still nothing.