From: ellson Date: Thu, 10 Dec 2009 18:49:12 +0000 (+0000) Subject: add comments to rounding change, and do same to width X-Git-Tag: LAST_LIBGRAPH~32^2~1505 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d1930a44f7153ee56cd3ea612d36de1529b7086;p=graphviz add comments to rounding change, and do same to width --- diff --git a/plugin/pango/gvtextlayout_pango.c b/plugin/pango/gvtextlayout_pango.c index 3d5141f68..a5454c7e1 100644 --- a/plugin/pango/gvtextlayout_pango.c +++ b/plugin/pango/gvtextlayout_pango.c @@ -187,8 +187,8 @@ static boolean pango_textlayout(textpara_t * para, char **fontpath) logical_rect.height = 0; textlayout_scale = POINTS_PER_INCH / (FONT_DPI * PANGO_SCALE); - para->width = ROUND(logical_rect.width * textlayout_scale); - para->height = ROUND(logical_rect.height * textlayout_scale+1); + para->width = (int)(logical_rect.width * textlayout_scale + 1.0); /* round up so that width/height are never too small */ + para->height = (int)(logical_rect.height * textlayout_scale + 1.0); /* The y offset from baseline to 0,0 of the bitmap representation */ iter = pango_layout_get_iter (layout);