Page 1 of 1

image color problem

Posted: Fri Nov 25, 2011 6:23 pm
by dar0n123
+

Re: image color problem

Posted: Fri Nov 25, 2011 6:35 pm
by vrld
The image is set to black before drawing the image (the second love.graphics.setColor(0,0,0)).
You can fix this by either disabling color modulation[/url] or setting the color to white before drawing the image:

Code: Select all

love.graphics.setColor(255,255,255)
love.graphics.draw(man, manx, many)
Also, your first love.graphics.print() will be tinted white, because all love.graphics functions that draw stuff use the most currently set color. Think of love.graphics.setColor as picking a crayon of a specific color which you use to draw stuff. The corrected code:

Code: Select all

function love.draw()
    love.graphics.setColor(255,255,255)
    love.graphics.draw(man, manx, many)

    love.graphics.setColor(0,0,0)
    love.graphics.print("x="..manx, 1, 1)
    love.graphics.print("y="..many, 1, 13)
end

Re: image color problem

Posted: Fri Nov 25, 2011 6:37 pm
by dar0n123
+