From: kramm Date: Wed, 12 Oct 2005 18:31:36 +0000 (+0000) Subject: fixed linewidth rounding X-Git-Tag: xpdf-3-01~45 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=3cdc844531091d6e19ae9d973c8b8de311ebff85 fixed linewidth rounding --- diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 4abead9..8eaacd3 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -1316,14 +1316,17 @@ static void swfoutput_setstrokecolor(gfxdevice_t* dev, U8 r, U8 g, U8 b, U8 a) i->strokergb.a = a; } +//#define ROUND_UP 19 +//#define ROUND_UP 10 + static void swfoutput_setlinewidth(gfxdevice_t*dev, double _linewidth) { swfoutput_internal*i = (swfoutput_internal*)dev->internal; - if(i->linewidth == (U16)(_linewidth*20+19)) + if(i->linewidth == (U16)(_linewidth*20+19.0/20.0)) return; if(i->shapeid>=0) endshape(dev); - i->linewidth = (U16)(_linewidth*20+19); + i->linewidth = (U16)(_linewidth*20+19.0/20.0); }