Hello,
I’m seeing something strange when using masks.
I have several separate groups which each are masked. The mask dimensions are dividable by 4 and have a 3 pixel black border. The mask itself contains some white and some gray. Running Corona Version 2014.2189 (2014.3.6), device: Ipad 3 & 4 latest and previous iOS versions.
The strange part is that the group created first have less transparency in the gray part of the mask than the group created last.
I have attached the image and mask used, and below is the code:
local bg = display.newRect(0, 0, 1024, 768) bg:setFillColor(1, 1) bg.anchorX, bg.anchorY = 0, 0 local asset = { path = 'log\_long.png', width = 585, height = 134 } local maskPath = 'log\_long\_watermask\_blackborders.png' local grp1 = display.newGroup() local mask1 = graphics.newMask(maskPath) local img1 = display.newImageRect(asset.path, asset.width, asset.height) grp1:setMask(mask1) grp1:insert(img1) grp1.x, grp1.y = 400, 100 local grp2 = display.newGroup() local img2 = display.newImageRect(asset.path, asset.width, asset.height) local mask2 = graphics.newMask(maskPath) grp2:setMask(mask2) grp2.x, grp2.y = 550, 250 grp2:insert(img2) local grp3 = display.newGroup() local mask3 = graphics.newMask(maskPath) local img3 = display.newImageRect(asset.path, asset.width, asset.height) grp3:setMask(mask3) grp3:insert(img3) grp3.x, grp3.y = 400, 400 local grp4 = display.newGroup() local mask4 = graphics.newMask(maskPath) local img4 = display.newImageRect(asset.path, asset.width, asset.height) grp4:setMask(mask4) grp4:insert(img4) grp4.x, grp4.y = 400, 550 -- changing the z-index you can see how the masks affect each other --grp1:toFront()
This seems like a Corona bug to me, but if it is not, and I have done some mistake in my code, no one would be happier than me (release day coming soon). Please help.
Kind Regards,