From 3cdc844531091d6e19ae9d973c8b8de311ebff85 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 12 Oct 2005 18:31:36 +0000 Subject: [PATCH] fixed linewidth rounding --- pdf2swf/swfoutput.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); } -- 1.7.10.4