I have a rect filled by a regular image but looking at the graphics guides I can’t seem to figure out how to shade the filled image by, say, 50%.
Anyone got any ideas? Here’s the code I’ve got now…
local rect = display.newRect( 100, 100, 200, 200 ) local compositePaint = { type="composite", paint1={ type="image", filename="picture.png" }, paint2={ type="image", filename="black.png" } } rect.fill = {type="image",filename="picture.png"}
I was hoping to be able to fill with an image and then apply an effect, but the composite doesn’t appear to give the right result.
The result I’m looking for is the same effect as loading an image and then placing another rect over the top with this fill: { 0, 0, 0, .5 }