lovebrew / lovepotion

LÖVE for Nintendo Homebrew
https://lovebrew.org
Other
552 stars 42 forks source link

[Bug]: canvases don't draw at the right scale or position #221

Open Beelzebold opened 10 months ago

Beelzebold commented 10 months ago

Software Version

3.0

What Happened?

image above, the contents to be drawn to screen are drawn to a canvas, which is then drawn to 0,0 with no applied scale or offset

What was Expected?

image this is the same thing just drawn directly to the screen instead, with no canvas. this is also the result I get when using the canvas in love2d on my pc.

Code to Reproduce

--notice if you run this as-is that the text may appear partially past the top of the screen, with weirdly scaled pixels
tilecanvas=love.graphics.newCanvas(400,240)

--main loop functions
function love.load()
    love.graphics.setCanvas(tilecanvas)
    love.graphics.print("hello world",0,10)
    love.graphics.setCanvas()
    end
function love.draw(screen)
    if screen~="bottom" then--top screen
        love.graphics.setColor(1,1,1)
        love.graphics.draw(tilecanvas,0,0)
        --love.graphics.print("hello world",0,10)
        else--bottom screen

        end
    end

Console

Nintendo 3DS

Firmware Version(s)

11.17.0-50u

Custom Firmware Version

13.0.2

Execution Method

Homebrew Menu

Code of Conduct

Beelzebold commented 10 months ago

didn mean do dat