draw2d icon indicating copy to clipboard operation
draw2d copied to clipboard

Turn off antialiasing?

Open logiterra opened this issue 9 years ago • 3 comments

I can see in the code what I need to modify but a simpler approach would be handy. By "embedding" values such as polygon ids into the RGBA values one can paint data onto the raster map. With antialiasing the edges get erroneous values. This addition would be handy for GIS work / visualisation.

logiterra avatar Dec 04 '16 09:12 logiterra

Hi @logiterra, in existing implementations, drawpdf, drawimg. There's no way to remove antialiasing option. It could be implemented in drawimg but I'm not sure it works well with text.

llgcode avatar Dec 05 '16 08:12 llgcode

Thanks for your reply. Turning off antialiasing does seem to fall outside the scope of the project.

We are painting 10's thousands of polygon indices onto a raster map used in the background as a lookup table. When a theme is changed we don't have to redraw the polygons we just scan the background raster map pixel by pixel to get the polygon index to lookup colour for a new raster map pixel by pixel. Much faster than redrawing and dithering can be can be done based on polygon attributes. We are currently using Java but are looking for a Go solution.

Thanks for your time.

logiterra avatar Dec 05 '16 19:12 logiterra

@logiterra I've experimented a rasteriser without antialiasing last year, feel free to fork it :) https://github.com/llgcode/go-exp-raster

llgcode avatar Dec 06 '16 09:12 llgcode