Page 1 of 1

Rendering a 800x600 png, gets shurnk 50&%... why

Posted: Tue Sep 22, 2009 5:01 am
by drvillain
Im loading an 800x600 png as a background. and the code forces me to scale it up 2x.
just
love.graphics.draw(graphics["bg"], 0, 0)
will produce the image just takeing up 1 corner of the screen. 50% reduction.

im forced to do
love.graphics.draw(graphics["bg"], 0, 0,0,2,2)
which is giving me shitty fps...

any insight

Re: Rendering a 800x600 png, gets shurnk 50&%... why

Posted: Tue Sep 22, 2009 5:39 am
by Robin
I think you are using 0.5.0. The drawing location is the middle of the image. So if you draw at (0, 0), that is where the center will be. IIRC using image:setCenter(0, 0) inside load() will fix this for you.

Re: Rendering a 800x600 png, gets shurnk 50&%... why

Posted: Tue Sep 22, 2009 6:14 am
by TechnoCat
Robin wrote:I think you are using 0.5.0. The drawing location is the middle of the image. So if you draw at (0, 0), that is where the center will be. IIRC using image:setCenter(0, 0) inside load() will fix this for you.
This is an insight the large image is being cropped by the window edges rather than being scaled.

Re: Rendering a 800x600 png, gets shurnk 50&%... why

Posted: Tue Sep 22, 2009 2:29 pm
by drvillain
Thanks, this is correct, and now rendering corectly