Issues

Issue #693 wontfix

drawing to canvas flips y-axis inconsistently

jan borchers
created an issue

Steps to reproduce:

Draw a point and a line in love.draw:

function love.draw()
    love.graphics.setPointSize(10)
    love.graphics.point(10, 10)
    love.graphics.line(10, 10, 100, 100)
end

note how the point's y-coordinate corresponds to the line's starting point's y-coordinate.

Now draw these to a canvas and render the canvas in love.draw:

function love.load()
    love.graphics.setPointSize(10)
    local canv = love.graphics.newCanvas(200, 200)
    canv:renderTo(function()
        love.graphics.point(10, 10)
        love.graphics.line(10, 10, 100, 100)
    end)
    img = love.graphics.newImage(canv:getImageData())
end

function love.draw()
    love.graphics.draw(img, 0, 0)
end

note how the line is drawn normally, but the point's y-axis seems to start from the bottom up.

reproducible 100% of the time

love-version 0.8.0

windows vista

Comments (8)

  1. Alex Szpakowski

    I can't reproduce this in Mac OS X. What video card do you have? Are your video drivers as up to date as possible?

    Also, you don't need to make a new image from the imagedata obtained from the canvas, you can just draw the canvas with love.graphics.draw. :)

  2. Minh Ngo

    I am unable to reproduce this on the latest build. I see a point at the top left and a line originating from that point pointing down right.

    Windows 7, 64 bit build, GT 220

  3. Bart van Strien

    Can't reproduce this either on linux (both tip and 0.8.0). I do know vrld spent a lot of time on the combination shaders and canvases, because the axes are flipped there, could this be an artifact of the same problem? A bad driver?

  4. jan borchers reporter

    It's an on-board one. Mobile Intel Series 4 Express Chipset. I'm on "holiday" with my crap-top, but the drivers are definitely up to date. Will try on other machines when I'm back home, but if none of you can reproduce it, it doesn't seem critical.

    Also it works fine with all the other functions: circles, rectangles, etc, it's just points that behave weirdly.

    Thanks for the tip Alex Szpakowski!

  5. Log in to comment