Created
September 7, 2011 22:34
-
-
Save walterlua/1202004 to your computer and use it in GitHub Desktop.
Example showing image tinting based on modifying the HelloWorld sample in Corona SDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local w,h = display.contentWidth*0.5, display.contentHeight*0.5 | |
local halfW,halfH = 0.5*w, 0.5*h | |
local background = display.newImageRect( "world.jpg", w,h ) | |
background:translate( halfW, halfH ) | |
local dw = w + halfW | |
local dh = h + halfH | |
local background = display.newImageRect( "world.jpg", w,h ) | |
background:setFillColor( 255, 255, 0 ) | |
background:translate( dw, halfH ) | |
local background = display.newImageRect( "world.jpg", w,h ) | |
background:setFillColor( 255, 255, 0 ) | |
background:translate( halfW, dh ) | |
local background = display.newImageRect( "world.jpg", w,h ) | |
background:setFillColor( 255, 0, 255 ) | |
background:translate( dw, dh ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment