Skip to content

Commit

Permalink
fix surface size when rastering rotated SVG symbols
Browse files Browse the repository at this point in the history
fixes #5264
  • Loading branch information
olt authored and tbonfort committed Mar 23, 2016
1 parent cb0cb44 commit dc091b2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mapcairo.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static cairoFaceCache* getCairoFontFace(cairoCacheData *cache, FT_Face ftface) {
cur->options = cairo_font_options_create();
cairo_font_options_set_hint_style(cur->options,CAIRO_HINT_STYLE_NONE);
return cur;
}
}

#define msCairoSetSourceColor(cr, c) cairo_set_source_rgba((cr),(c)->red/255.0,(c)->green/255.0,(c)->blue/255.0,(c)->alpha/255.0);

Expand Down Expand Up @@ -1043,8 +1043,7 @@ int msRenderRasterizedSVGSymbol(imageObj *img, double x, double y, symbolObj *sy
height = surface_h = symbol->sizey;
}
if (style->rotation != 0) {
surface_w = MS_NINT(width * 1.415);
surface_h = MS_NINT(height * 1.415);
surface_w = surface_h = MS_NINT(MS_MAX(height, width) * 1.415);
}

surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, surface_w, surface_h);
Expand Down

0 comments on commit dc091b2

Please sign in to comment.