From 387a989ac6d1a3682aff57aeb75b50cc69e62579 Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 22 May 2005 11:21:15 +0000 Subject: [PATCH] fixed rounding of text bboxes. --- pdf2swf/swfoutput.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 5bb6338..255ca0f 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -525,9 +525,8 @@ static SRECT getcharacterbbox(struct swfoutput*obj, SWFFONT*font) b.xmax *= i->chardata[t].size; b.ymax *= i->chardata[t].size; - /* divide by 1024, rounding up */ - b.xmin += 1023; b.ymin += 1023; b.xmax += 1023; b.ymax += 1023; - b.xmin /= 1024; b.ymin /= 1024; b.xmax /= 1024; b.ymax /= 1024; + /* divide by 1024, rounding xmax/ymax up */ + b.xmax += 1023; b.ymax += 1023; b.xmin /= 1024; b.ymin /= 1024; b.xmax /= 1024; b.ymax /= 1024; b.xmin += i->chardata[t].x; b.ymin += i->chardata[t].y; -- 1.7.10.4