The style in which scaled images are rendered; how do I make them "rough" instead of "smooth?"

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
User avatar
sanjiv
Citizen
Posts: 88
Joined: Mon Feb 27, 2012 5:11 am

The style in which scaled images are rendered; how do I make them "rough" instead of "smooth?"

Post by sanjiv »

I've used love.graphics.draw in order to draw an image with sx and sy > 1, but the image looks fuzzy. How do I make it not look fuzzy?

I thought it'd be something like love.graphics.setLineStyle( 'rough' ), but that's not working for me.

If you want to look inside the love file, the file to look at would be
scene > 0 > draw megaman
line 35.

The relevant code would be

Code: Select all

		love.graphics.draw(
			img,
			quadTable[qy][qx],
			o.x,o.y,
			o.r, --r?
			o.sx*a, --sx?
			o.sy, --sy?
			o.ox+o.w/o.sx/2-turn_adjustment/o.sx,--ox
			o.oy+o.h/o.sy/2--oy
			)
Attachments
how do I sharpen scaled image.love
(278.9 KiB) Downloaded 116 times
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: The style in which scaled images are rendered; how do I make them "rough" instead of "smooth?"

Post by Tjakka5 »

Either use (Image):setFilter or love.graphics.setDefaultFilter as ('nearest', 'nearest').
User avatar
sanjiv
Citizen
Posts: 88
Joined: Mon Feb 27, 2012 5:11 am

Re: The style in which scaled images are rendered; how do I make them "rough" instead of "smooth?"

Post by sanjiv »

works great! I set it right after I created a newImage, like so

Code: Select all

	s.img[1] = lg.newImage('megaman/sprite sheets/classicMegaManSprites.png')
	s.img[1]:setFilter( "nearest", "nearest" )
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 78 guests