Skip to content

Instantly share code, notes, and snippets.

@u1tnk
Created February 19, 2013 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u1tnk/4986321 to your computer and use it in GitHub Desktop.
Save u1tnk/4986321 to your computer and use it in GitHub Desktop.
CoronaSDKのgroupへのマスクサンプル
local group = display.newGroup()
local rect1 = display.newRect(0, 0, 50, 1000)
rect1:setFillColor(255, 0, 0)
local rect2 = display.newRect(0, 0, 1000, 50)
rect2:setFillColor(0, 255, 0)
group:insert(rect1)
group:insert(rect2)
local mask = graphics.newMask("mask.png") -- 256x256
group:setMask( mask )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment