X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fdevices%2Fswf.c;h=59a9d0cff957c20c9735f364dd7923afc15e0f6a;hp=af5d2842e81ff272e869d40aa57721bfdd8f9670;hb=af9a0b4c2720a7890c7226e32c2738f2ada135f8;hpb=a1587574bba2fe7cffe40aa1bad0fe84aed23825 diff --git a/lib/devices/swf.c b/lib/devices/swf.c index af5d284..59a9d0c 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -208,14 +208,13 @@ typedef struct _swfoutput_internal static const int NO_FONT3=0; -static void swf_fillbitmap(gfxdevice_t*driver, gfxline_t*line, gfximage_t*img, gfxmatrix_t*move, gfxcxform_t*cxform); +static void swf_fillbitmap(gfxdevice_t*dev, gfxline_t*line, gfximage_t*img, gfxmatrix_t*matrix, gfxcxform_t*cxform); static int swf_setparameter(gfxdevice_t*driver, const char*key, const char*value); static void swf_drawstroke(gfxdevice_t*dev, gfxline_t*line, gfxcoord_t width, gfxcolor_t*color, gfx_capType cap_style, gfx_joinType joint_style, gfxcoord_t miterLimit); static void swf_startclip(gfxdevice_t*dev, gfxline_t*line); static void swf_endclip(gfxdevice_t*dev); static void swf_stroke(gfxdevice_t*dev, gfxline_t*line, gfxcoord_t width, gfxcolor_t*color, gfx_capType cap_style, gfx_joinType joint_style, gfxcoord_t miterLimit); static void swf_fill(gfxdevice_t*dev, gfxline_t*line, gfxcolor_t*color); -static void swf_fillbitmap(gfxdevice_t*dev, gfxline_t*line, gfximage_t*img, gfxmatrix_t*matrix, gfxcxform_t*cxform); static void swf_fillgradient(gfxdevice_t*dev, gfxline_t*line, gfxgradient_t*gradient, gfxgradienttype_t type, gfxmatrix_t*matrix); static void swf_drawchar(gfxdevice_t*dev, gfxfont_t*font, int glyph, gfxcolor_t*color, gfxmatrix_t*matrix); static void swf_addfont(gfxdevice_t*dev, gfxfont_t*font); @@ -956,6 +955,7 @@ static void endpage(gfxdevice_t*dev) swfoutput_internal*i = (swfoutput_internal*)dev->internal; if(i->pagefinished) return; + if(i->shapeid>=0) endshape(dev); if(i->textmode) @@ -1178,7 +1178,6 @@ void gfxdevice_swf_init(gfxdevice_t* dev) dev->startclip = swf_startclip; dev->endclip = swf_endclip; dev->fill = swf_fill; - dev->fillbitmap = swf_fillbitmap; dev->fillgradient = swf_fillgradient; dev->addfont = swf_addfont; dev->drawchar = swf_drawchar; @@ -2121,6 +2120,8 @@ int swf_setparameter(gfxdevice_t*dev, const char*name, const char*value) i->config_dumpfonts = atoi(value); } else if(!strcmp(name, "animate")) { i->config_animate = atoi(value); + } else if(!strcmp(name, "linknameurl")) { + i->config_linknameurl = atoi(value); } else if(!strcmp(name, "showimages")) { i->config_showimages = atoi(value); } else if(!strcmp(name, "disablelinks")) { @@ -3038,7 +3039,7 @@ static void setfontscale(gfxdevice_t*dev,double m11,double m12, double m21,doubl MATRIX m; swf_GetMatrix(0, &m); - if(m21 || m12 || fabs(m11+m22)>0.001) { + if(m21 || m12 || fabs(m11+m22)>0.001 || m11<0) { double ifs = (double)extrazoom/(i->current_font_size); m.sx = (S32)((m11*ifs)*65536); m.r1 = -(S32)((m21*ifs)*65536); m.r0 = (S32)((m12*ifs)*65536); m.sy = -(S32)((m22*ifs)*65536);