X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fmodules%2Fswfrender.c;h=11b0c502096dccc6b63e28760813b93c6ee050f1;hb=98c2aea6b4805af2151b30ddbafd9de267903e55;hp=062930a2d8e1b714549ec6d7416ff5d86e09f0f4;hpb=20718c7dff30c7a676dae1088c2f61b93a53a4c8;p=swftools.git diff --git a/lib/modules/swfrender.c b/lib/modules/swfrender.c index 062930a..11b0c50 100644 --- a/lib/modules/swfrender.c +++ b/lib/modules/swfrender.c @@ -565,7 +565,7 @@ static void fill_bitmap(RGBA*line, int*z, int y, int x1, int x2, MATRIX*m, bitma return; } det = 20.0/det; - + if(!b->width || !b->height) { fill_solid(line, z, y, x1, x2, color_red, depth); return; @@ -586,6 +586,8 @@ static void fill_bitmap(RGBA*line, int*z, int y, int x1, int x2, MATRIX*m, bitma } else { xx %= b->width; yy %= b->height; + if(xx<0) xx += b->width; + if(yy<0) yy += b->height; } col = b->data[yy*b->width+xx]; @@ -1005,10 +1007,10 @@ static void textcallback(void*self, int*chars, int*xpos, int nr, int fontid, int } else { SHAPE2*shape = font->glyphs[chars[t]]; shape->fillstyles[0].color = *color; //q&d - printf("Rendering char %d (size %d, x:%d, y:%d) color:%02x%02x%02x%02x\n", chars[t], fontsize, x, y, + /*printf("Rendering char %d (size %d, x:%d, y:%d) color:%02x%02x%02x%02x\n", chars[t], fontsize, x, y, color->a, color->r, color->g, color->b); swf_DumpMatrix(stdout, &m); - swf_DumpShape(shape); + swf_DumpShape(shape);*/ swf_RenderShape(info->buf, shape, &m, info->cxform, info->depth, info->clipdepth); } }