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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
drvillain
Prole
Posts: 3
Joined: Tue Sep 22, 2009 4:58 am

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

Post 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
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post 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.
Help us help you: attach a .love.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

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

Post 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.
drvillain
Prole
Posts: 3
Joined: Tue Sep 22, 2009 4:58 am

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

Post by drvillain »

Thanks, this is correct, and now rendering corectly
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 9 guests