Closed fordarian closed 4 years ago
You need to offset them by 0.5 to get crisp lines. This is common for antialiasing rasterizers: http://usefulangle.com/post/17/html5-canvas-drawing-1px-crisp-straight-lines
There's already an example in the repo here:
https://github.com/fogleman/gg/blob/master/examples/crisp.go
Works perfect, thank you!
Hello. I need to draw some grids with 1 pixel wide lines. But LineTo\DrawLine functions produce 2px wide lines, even with SetLineWidth(1). The coordinates have no fractured parts. The only way i managed to plot them correctly is using SetPixel function. Is it the only and correct way?