Hey there, I am getting a strange bug when I try to mask a card (from spritesheet) with a rounded corners rectangle
I am using the Peaches approach on her tutorial, but simply added a mask and the image crashes.
I’ve tried another shapes on the mask and always they look skewed. Note that the rounded corners are skewed and stretched.
[lua]display.setStatusBar( display.HiddenStatusBar )
require ‘sprite’
local cardsheet = sprite.newSpriteSheet(“tileSheet2.png”, 145, 191)
local cardset = sprite.newSpriteSet (cardsheet, 1, 4)
sprite.add (cardset, “buggyBuggy”, 3, 1, 300, 0)
local cardFront = sprite.newSprite (cardset)
cardFront.x = 160
cardFront.y = 200
cardFront:prepare(“buggyBuggy”)
local buggyMask = graphics.newMask( ‘mask1.png’ )
cardFront:setMask(buggyMask)[/lua]
Here are the images I am working with.
mask1.png
spriteSheet2.png
Corona Simulator
[import]uid: 115838 topic_id: 26292 reply_id: 326292[/import]