- 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 */
/* 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 */
for(y=0;y<watermark2_height;y++)
for(x=0;x<watermark2_width;x++) {
if(((watermark2[x]>>y)&1)) {
for(y=0;y<watermark2_height;y++)
for(x=0;x<watermark2_width;x++) {
if(((watermark2[x]>>y)&1)) {
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);
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);
if(drawall) {
swfoutput_setfillcolor(dev, 0,0,255,192);
} else {
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);
- /* set clipping/background rectangle */
- /* TODO: this should all be done in SWFOutputDev */
- //setBackground(dev, x1, y1, x2, y2);
+ /* create a bbox structure with the page size. This is used
+ for clipping shape and text bounding boxes. As we don't want to
+ generate bounding boxes which extend beyond the movie size (in
+ order to not confuse Flash), we clip everything against i->pagebbox */
+ i->pagebbox.xmin = 0;
+ i->pagebbox.ymin = 0;
+ i->pagebbox.xmax = width*20;
+ i->pagebbox.ymax = height*20;
- changeRect(dev, i->tag, i->bboxrectpos, &i->bboxrect);
+ SRECT r = swf_ClipRect(i->pagebbox, i->bboxrect);
+ changeRect(dev, i->tag, i->bboxrectpos, &r);
r.ymin = (int)(bbox.ymin*20);
r.xmax = (int)(bbox.xmax*20);
r.ymax = (int)(bbox.ymax*20);
r.ymin = (int)(bbox.ymin*20);
r.xmax = (int)(bbox.xmax*20);
r.ymax = (int)(bbox.ymax*20);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,i->shape);
swf_ShapeCountBits(i->shape,NULL,NULL);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,i->shape);
swf_ShapeCountBits(i->shape,NULL,NULL);
r.ymin = (int)(bbox.ymin*20);
r.xmax = (int)(bbox.xmax*20);
r.ymax = (int)(bbox.ymax*20);
r.ymin = (int)(bbox.ymin*20);
r.xmax = (int)(bbox.xmax*20);
r.ymax = (int)(bbox.ymax*20);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,i->shape);
swf_ShapeCountBits(i->shape,NULL,NULL);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,i->shape);
swf_ShapeCountBits(i->shape,NULL,NULL);
int fsid = swf_ShapeAddBitmapFillStyle(shape,&m,bitid,1);
swf_SetU16(i->tag, myshapeid);
SRECT r = gfxline_getSWFbbox(line);
int fsid = swf_ShapeAddBitmapFillStyle(shape,&m,bitid,1);
swf_SetU16(i->tag, myshapeid);
SRECT r = gfxline_getSWFbbox(line);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,shape);
swf_ShapeCountBits(shape,NULL,NULL);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,shape);
swf_ShapeCountBits(shape,NULL,NULL);
swf_SetU16(i->tag,myshapeid);
SRECT r = gfxline_getSWFbbox(line);
swf_SetU16(i->tag,myshapeid);
SRECT r = gfxline_getSWFbbox(line);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,shape);
swf_ShapeCountBits(shape,NULL,NULL);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,shape);
swf_ShapeCountBits(shape,NULL,NULL);
}
swf_SetU16(i->tag,myshapeid);
SRECT r = gfxline_getSWFbbox(line);
}
swf_SetU16(i->tag,myshapeid);
SRECT r = gfxline_getSWFbbox(line);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,shape);
swf_ShapeCountBits(shape,NULL,NULL);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,shape);
swf_ShapeCountBits(shape,NULL,NULL);
int fsid = swf_ShapeAddGradientFillStyle(shape,&m,swfgradient,type==gfxgradient_radial);
swf_SetU16(i->tag, myshapeid);
SRECT r = gfxline_getSWFbbox(line);
int fsid = swf_ShapeAddGradientFillStyle(shape,&m,swfgradient,type==gfxgradient_radial);
swf_SetU16(i->tag, myshapeid);
SRECT r = gfxline_getSWFbbox(line);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,shape);
swf_ShapeCountBits(shape,NULL,NULL);
swf_SetRect(i->tag,&r);
swf_SetShapeStyles(i->tag,shape);
swf_ShapeCountBits(shape,NULL,NULL);