From ad7b3db9bccfeee0388da407558e5021a50a7d42 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 26 Mar 2008 12:54:22 +0000 Subject: [PATCH] switched from lrand48() to rand() --- lib/devices/swf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/devices/swf.c b/lib/devices/swf.c index 6027af2..4d75a1f 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -760,8 +760,8 @@ static void setfontscale(gfxdevice_t*dev,double m11,double m12, double m21,doubl double ifs = 1.0 / (i->current_font_size*GLYPH_SCALE); MATRIX m; - m.sx = (U32)((m11*ifs)*65536); m.r1 = (U32)((m21*ifs)*65536); - m.r0 = (U32)((m12*ifs)*65536); m.sy = (U32)((m22*ifs)*65536); + m.sx = (S32)((m11*ifs)*65536); m.r1 = (S32)((m21*ifs)*65536); + m.r0 = (S32)((m12*ifs)*65536); m.sy = (S32)((m22*ifs)*65536); /* this is the position of the first char to set a new fontmatrix- we hope that it's close enough to all other characters using the font, so we use its position as origin for the matrix */ @@ -791,9 +791,9 @@ static void draw_watermark(gfxdevice_t*dev, gfxbbox_t r, char drawall) for(y=0;y>y)&1)) { - if(!drawall && lrand48()%5) + if(!drawall && rand()%5) continue; - unsigned int b = lrand48(); + unsigned int b = rand(); moveto(dev, i->tag, x*sx+tx+((b>>1)&1)/20.0, y*sy+ty+((b>>3)&1)/20.0); lineto(dev, i->tag, x*sx+px+tx+((b>>2)&1)/20.0, y*sy+ty+((b>>3)&1)/20.0); lineto(dev, i->tag, x*sx+px+tx+((b>>2)&1)/20.0, y*sy+py+ty+((b>>4)&1)/20.0); @@ -830,7 +830,7 @@ static void insert_watermark(gfxdevice_t*dev, char drawall) if(drawall) { swfoutput_setfillcolor(dev, 0,0,255,192); } else { - swfoutput_setfillcolor(dev, lrand48(),lrand48(),lrand48(),(lrand48()&127)+128); + swfoutput_setfillcolor(dev, rand(),rand(),rand(),(rand()&127)+128); } startshape(dev); startFill(dev); -- 1.7.10.4