I'm making an arcade game in as3 and I want to draw pixely(unsmoothed by flash) lines. I'm drawing the pixels 'by hand'(not with flash's lineTo or anything) onto a bitmapdata object.
The lines don't appear quite right though, when zoomed out the line is rendered 2 pixels thick at some parts. However by zooming it its apparent that the algorithm is fine and its not doubling the pixels. Changing the quality doesn't seem to change anything. Any idea how i can get pixel perfect lines?
g=new BitmapData(w,h,false,0x000000);
var bmp:Bitmap=new Bitmap(g);
addChild(bmp);
//...
Util.drawLine(x1,y1,x2,y2,0xFFFFFF,g);
The algorithm isn't relevant since I know from the zoom in its not really doubling, and since its drawing to a bitmap it has to be drawn in pixel increments. But its just a as3 version of the 2nd one listed on this page