Pixelization & Anti-aliasing Issue

Hi guys,

I am trying to draw some angled-lines (using newLine & newPolygon), but I notice the lines are pixelized.

I set the ‘antialias = true’ in config.lua, but it still persist.

Any advise on how to make it a nice line ?

Screenshot is from Android Nexus 5 phone

What about adding a filter to them? Like blur and then sharpen? Not sure if you can do that.

Don’t know if it would work with lines but you might want to take a look at ingemar’s idea in this thread
https://forums.coronalabs.com/topic/49837-anti-alias-smoothing-shapes/

It’s about making antialias on polygons by using small images as stroke fills.

We turned off anti-aliasing a long time ago for performance reasons (back when Graphics 2.0 came out) if I’m remembering correctly. I’ll ping the engineers and see if they remember why.

In the mean time there is an open Feedback request at:  http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/3723228-anti-aliasing

Feel free to vote it up.

Thanks

Rob

Thanks guys. I tried drawing the line with an image file ( 2px width, 1px height). but still having the problem. Will have wait for the anti-aliasing feature.

local function testLineImage( xPos, yPos ) local line1 = display.newImageRect( 'asset/line\_v1.png', 2,1 ) line1.xScale = 50 line1.x = xPos + line1.contentWidth/2 line1.y = yPos line1:rotate( math.random( 0,90) ) return line1 end

What about adding a filter to them? Like blur and then sharpen? Not sure if you can do that.

Don’t know if it would work with lines but you might want to take a look at ingemar’s idea in this thread
https://forums.coronalabs.com/topic/49837-anti-alias-smoothing-shapes/

It’s about making antialias on polygons by using small images as stroke fills.

We turned off anti-aliasing a long time ago for performance reasons (back when Graphics 2.0 came out) if I’m remembering correctly. I’ll ping the engineers and see if they remember why.

In the mean time there is an open Feedback request at:  http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/3723228-anti-aliasing

Feel free to vote it up.

Thanks

Rob

Thanks guys. I tried drawing the line with an image file ( 2px width, 1px height). but still having the problem. Will have wait for the anti-aliasing feature.

local function testLineImage( xPos, yPos ) local line1 = display.newImageRect( 'asset/line\_v1.png', 2,1 ) line1.xScale = 50 line1.x = xPos + line1.contentWidth/2 line1.y = yPos line1:rotate( math.random( 0,90) ) return line1 end