Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Feb 3, 2021
1 parent 8d8bcfd commit 23aa998
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
10 changes: 6 additions & 4 deletions mapagg.cpp
Expand Up @@ -189,10 +189,12 @@ int agg2RenderLine(imageObj *img, shapeObj *p, strokeStyleObj *style)
r->m_rasterizer_aa.filling_rule(mapserver::fill_non_zero);
if (style->antialiased== MS_FALSE)
{
r->m_renderer_scanline_aliased.color(aggColor(style->color));
r->m_renderer_scanline_aliased.color(aggColor(style->color));
}
else
r->m_renderer_scanline.color(aggColor(style->color));
{
r->m_renderer_scanline.color(aggColor(style->color));
}

if (style->patternlength <= 0) {
if(!r->stroke) {
Expand Down Expand Up @@ -245,9 +247,9 @@ int agg2RenderLine(imageObj *img, shapeObj *p, strokeStyleObj *style)
r->m_rasterizer_aa.add_path(*r->stroke_dash);
}
if (style->antialiased == MS_FALSE)
mapserver::render_scanlines(r->m_rasterizer_aa, r->sl_line, r->m_renderer_scanline_aliased);
mapserver::render_scanlines(r->m_rasterizer_aa, r->sl_line, r->m_renderer_scanline_aliased);
else
mapserver::render_scanlines(r->m_rasterizer_aa, r->sl_line, r->m_renderer_scanline);
mapserver::render_scanlines(r->m_rasterizer_aa, r->sl_line, r->m_renderer_scanline);
return MS_SUCCESS;
}

Expand Down
7 changes: 4 additions & 3 deletions mapfile.c
Expand Up @@ -2428,9 +2428,10 @@ int loadStyle(styleObj *style)
}
break;
case(ANTIALIAS):
if ((symbol = getSymbol(2, MS_TRUE,MS_FALSE)) == -1) return(-1);
if (symbol == MS_FALSE)
style->antialiased = MS_FALSE;
if ((symbol = getSymbol(2, MS_TRUE,MS_FALSE)) == -1) return(-1);
if (symbol == MS_FALSE) {
style->antialiased = MS_FALSE;
}
break;
case(BACKGROUNDCOLOR):
if(loadColor(&(style->backgroundcolor), NULL) != MS_SUCCESS) return(MS_FAILURE);
Expand Down
Binary file added msautotest/renderers/expected/line_aliased.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions msautotest/renderers/line_aliased.map
Expand Up @@ -10,12 +10,12 @@ fontset "../misc/fonts.lst"
symbolset "symbolset"

OUTPUTFORMAT
NAME "png"
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
FORMATOPTION "GAMMA=1.0"
NAME "png"
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
FORMATOPTION "GAMMA=1.0"
END

layer
Expand All @@ -27,7 +27,7 @@ layer
style
color 128 128 128
width 5
ANTIALIAS FALSE
ANTIALIAS FALSE
end
end
end
Expand Down
14 changes: 7 additions & 7 deletions msautotest/renderers/line_antialiased.map
Expand Up @@ -10,12 +10,12 @@ fontset "../misc/fonts.lst"
symbolset "symbolset"

OUTPUTFORMAT
NAME "png"
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
FORMATOPTION "GAMMA=1.0"
NAME "png"
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
FORMATOPTION "GAMMA=1.0"
END

layer
Expand All @@ -27,7 +27,7 @@ layer
style
color 128 128 128
width 5
ANTIALIAS TRUE
ANTIALIAS TRUE
end
end
end
Expand Down

0 comments on commit 23aa998

Please sign in to comment.