Blurry canvas drawing

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
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Blurry canvas drawing

Post by GijsB »

I'm again having some problems with canvases!

I have 2 situations which should(?) be identical :

1.

Code: Select all

function love.draw()
	love.graphics.printf("lol",0,0,100,"left")
end
2.

Code: Select all

function love.load()
	c1 = love.graphics.newCanvas(100,100)
	love.graphics.setCanvas(c1)
		love.graphics.printf("lol",0,0,100,"left")
	love.graphics.setCanvas()
end

function love.draw()
	love.graphics.draw(c1)
end
however case 2 the text is appears blurry even though i'm still drawing on integer coordinates...

Anyone know why?

Edit : added small example .love
Attachments
test.love
(555 Bytes) Downloaded 127 times
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Blurry canvas drawing

Post by grump »

Code: Select all

function love.draw()
	x = math.floor(math.sin(love.timer.getTime()*0.1)*100+100)
	love.graphics.setBlendMode('alpha', 'premultiplied')
	love.graphics.draw(c1,x,0)
	love.graphics.setBlendMode('alpha', 'alphamultiply')
	love.graphics.printf("this is a test sentence",x,20,200,"left")
end
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: Blurry canvas drawing

Post by GijsB »

Thanks, it works!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 63 guests