Opened 16 years ago

Closed 16 years ago

#2749 closed defect (duplicate)

Polygon outlines are always drawn with the AGG renderer.

Reported by: brage Owned by: tbonfort
Priority: normal Milestone:
Component: AGG Version: unspecified
Severity: normal Keywords:
Cc: sdlime, dmorissette

Description

The Agg renderer suffers from the same problem as the GD renderer as described in issue #2734.

It is not possible to draw a polygon without an outline, which leads to loss of detail and polygons which are slightly to large.

The problem seems to be that msDrawShadeSymbolAGG() always draw an outline around polygons to avoid antialiasing artifacts between polygons:

    if(style->symbol == 0 || symbol->type==MS_SYMBOL_SIMPLE) {
        // simply draw a solid fill and outline of the specified colors
        if(MS_VALID_COLOR(style->outlinecolor))
            ren->renderPathSolid(*polygons,agg_color,agg_ocolor,style->width);
            //use outline width without scalefactor applied
        else
            //draw a one pixel outline of the same color as the fill to avoid a faint outline
            ren->renderPathSolid(*polygons,agg_color,agg_color,1); 
    }

I believe that in this case the cure might be as bad as the disease; compare ne_coastline_agg.png with ne_coastline_without_outline.png, where

   ren->renderPathSolid(*polygons,agg_color,agg_color,1); 

has been changed to

   ren->renderPathSolid(*polygons,agg_color,agg_color,0);

I do not have a fix for the antialiasing problem, but it is possible that AGG should render the whole layer or class as a single unit rather than shape-by-shape.

Attachments (2)

ne_coastline_agg.png (63.0 KB ) - added by brage 16 years ago.
ne_coastline_without_outline.png (74.7 KB ) - added by brage 16 years ago.

Download all attachments as: .zip

Change History (4)

by brage, 16 years ago

Attachment: ne_coastline_agg.png added

comment:1 by dmorissette, 16 years ago

Cc: dmorissette added

comment:2 by tbonfort, 16 years ago

Resolution: duplicate
Status: newclosed

duplicates #2616

Note: See TracTickets for help on using tickets.