It appears that, when calling image.drawScaled
, any images that are inverted are ignored.
Steps to Reproduce
- Have an image at hand.
- Make a copy of this image using
invertedImage
to invert the colors. - Call
drawScaled
on this inverted image. Notice the colors aren't inverted anymore.
Example Code:
local fg = playdate.graphics.image.new("foo")
if fg ~= nil then
-- isFilled is just an example condition here
if (isFilled) then
fg = fg:invertedImage()
end
fg:drawScaled(x, y, 2)
end
Expected Behavior
drawScaled
should respect that the image is inverted and draw it as desired.
Known Workarounds
- Use
scaledImage
, and then draw that normally:
local fg = playdate.graphics.image.new("foo")
if fg ~= nil then
-- isFilled is just an example condition here
if (isFilled) then
fg = fg:invertedImage()
end
fg:scaledImage(2, 2):draw(x, y, gfx.kImageUnflipped)
end
Environment
- SDK Version: 2.5.0
- Platform: Windows 11 23H2
- Device: Surface Pro 9