Skip to content

Instantly share code, notes, and snippets.

@walterlua
Created September 7, 2011 22:34
Show Gist options
  • Save walterlua/1202004 to your computer and use it in GitHub Desktop.
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
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