If I use setInverted(true) on an image and then attempt drawFaded(), the image is only inverted if alpha is 1.0. Otherwise the image is not inverted.
I'd expect all alpha levels to be inverted, but if this isn't supported, then alpha=1 .0 should not draw inverted.
import "CoreLibs/graphics"
local img = playdate.graphics.image.new("images/player")
function playdate.update()
playdate.graphics.clear()
img:setInverted(true)
img:drawFaded(0, 0, 1.0, playdate.graphics.image.kDitherTypeBayer8x8)
img:drawFaded(0, 100, 0.9, playdate.graphics.image.kDitherTypeBayer8x8)
end
1 Like
dan
(Dan Messing)
2
Looks like a bug to me. Thanks for letting us know about this, we'll try to get a fix in as soon as possible!
Thanks!
So... which way will this fall? Will Inverted apply to drawFaded or will drawFaded ignore Inverted?
I might be taking advantage of this bug at the moment. haha.
dan
(Dan Messing)
4
I think that if you've set an image to be inverted, it should draw inverted when you draw it via drawFaded()
. Does that make sense?
(hopefully it's easy enough to just draw with img:draw()
in the alpha = 1 case if you need the current behavior!)
Makes sense to me. Thanks!