Game Development Reference
In-Depth Information
Figure 11-4. Displaying the same image multiple times
If we want to display the silhouette of the image, we can recolor the image black, as shown in
Figure 11-5 . This can be done with the simple function setColor .
local theImage, x, y
function love.load()
theImage = love.graphics.newImage("myImage.png")
x = 50
y = 50
love.graphics.setColor(0,0,0,255)
love.graphics.setBackgroundColor(255,255,255,255)
end
function love.draw()
love.graphics.draw(theImage, x, y)
end
Search WWH ::




Custom Search