DrawRotatedBitmap rendering error when rendering out of bounds at specific angles

Popping in here to bump this this as I'm still seeing this issue on device and simulator with SDK 2.1.1.

rotate-bug

Code used to demo the repro in the GIF:

import("CoreLibs/graphics")

local image = playdate.graphics.image.new("asteroid")
local x = 400
local angle = 90
function playdate.update()
  playdate.graphics.clear()

  playdate.graphics.fillCircleAtPoint(x, 50, 16)
  image:drawRotated(x, 120, angle)

  if playdate.buttonIsPressed("left") then
    x = x - 2
  elseif playdate.buttonIsPressed("right") then
    x = x + 2
  end

  if playdate.buttonJustPressed("up") then
    angle = angle + 2
  elseif playdate.buttonJustPressed("down") then
    angle = angle - 2
  end

  playdate.graphics.drawText("angle="..angle, 0, 0)
end
1 Like