drawing lines are blurry when diagonal

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
Shadowblitz16
Citizen
Posts: 73
Joined: Wed Oct 28, 2015 11:18 pm

drawing lines are blurry when diagonal

Post by Shadowblitz16 »

can someone explain how to draw a x with two love.graphics.line functions?

I currently have this to draw a slash but its blurry and not pixel perfect

Code: Select all

            --X
            love.graphics.setColor(48,48,48)
            love.graphics.line(v.x+2.5, v.y+2.5, v.x+v.w-4.5, v.y+v.h-4.5) 
            love.graphics.line(v.x+2.5, v.y+2.5, v.x+v.w-4.5, v.y+v.h-4.5) 
I realize I am drawing with .5 on everything but that was a suggestion from this topic viewtopic.php?t=2131
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: drawing lines are blurry when diagonal

Post by slime »

Lines have antialiasing applied to them by default. You can use love.graphics.setLineStyle("rough") to disable it.
Shadowblitz16
Citizen
Posts: 73
Joined: Wed Oct 28, 2015 11:18 pm

Re: drawing lines are blurry when diagonal

Post by Shadowblitz16 »

thankyou
Post Reply

Who is online

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