[mapserver-users] Draw roads WITHOUT anti-aliasing

Eichner, Andreas - SID Andreas.Eichner at sid.sachsen.de
Tue Oct 17 23:28:23 PDT 2017


Hi,

I just meant that it seems to be pretty easy to implement aliased rendering with AGG.
Simply changing the typedef in line 91 of mapagg.cpp from

  typedef mapserver::renderer_scanline_aa_solid<renderer_base> renderer_scanline;

to

  typedef mapserver::renderer_scanline_bin_solid<renderer_base> renderer_scanline;

turns of anti-aliased rendering. I've attached the output of "shp2img -m line_simple.map" from the msautotests.
An additional member in class AGG2Renderer for the aliased rasterizer and conditionally passing one or the other
to render_scanlines() depending on some value of strokeStyleObj might be enough.

Regards

> -----Ursprüngliche Nachricht-----
> Von: Erik H [mailto:erik.h11.01 at gmail.com]
> Gesendet: Dienstag, 17. Oktober 2017 17:34
> An: Eichner, Andreas - SID
> Cc: Richard Greenwood; mapserver-users at lists.osgeo.org
> Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> 
> As for Andreas' remark about 'simply the use of another scanline
> rasterizer.' - I'm sorry but I'm not much of a C++ developer. If I have
> to do rasterizing, I'd skip MapServer altogether and generate the PNG in
> Java.
> 


More information about the mapserver-users mailing list