X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=lib%2Fdevices%2Frender.c;h=cf6c056f5c1deeaf70e05e17758e88a52ed31251;hb=9b4b8074e77d175ec0e723ff3c69ca400c8dfc21;hp=d9cca51aeb7b0819706e4858cfeb304bc1c24d74;hpb=6ecf136135c7071ecac3f7dfabfc015f51098bc4;p=swftools.git diff --git a/lib/devices/render.c b/lib/devices/render.c index d9cca51..cf6c056 100644 --- a/lib/devices/render.c +++ b/lib/devices/render.c @@ -438,6 +438,7 @@ void fill(gfxdevice_t*dev, fillinfo_t*fill) void fill_solid(gfxdevice_t*dev, gfxcolor_t* color) { fillinfo_t info; + memset(&info, 0, sizeof(info)); info.type = filltype_solid; info.color = color; fill(dev, &info); @@ -566,7 +567,7 @@ static void draw_line(gfxdevice_t*dev, gfxline_t*line) xx=x1; yy=y1; - parts = (int)(sqrt(c)/3); + parts = (int)(sqrt(c)); if(!parts) parts = 1; for(t=1;t<=parts;t++) { @@ -588,6 +589,7 @@ void render_startclip(struct _gfxdevice*dev, gfxline_t*line) { internal_t*i = (internal_t*)dev->internal; fillinfo_t info; + memset(&info, 0, sizeof(info)); newclip(dev); info.type = filltype_clip; draw_line(dev, line); @@ -619,6 +621,7 @@ void render_fillbitmap(struct _gfxdevice*dev, gfxline_t*line, gfximage_t*img, gf draw_line(dev, line); fillinfo_t info; + memset(&info, 0, sizeof(info)); info.type = filltype_bitmap; info.image = img; info.matrix = &m2; @@ -730,6 +733,7 @@ void*render_result_get(gfxresult_t*r, const char*name) i = i->next; if(!i) return 0; + pagenr--; } return gfximage_asXPM(&i->img, 64); } else if(!strncmp(name,"page",4)) { @@ -740,6 +744,7 @@ void*render_result_get(gfxresult_t*r, const char*name) i = i->next; if(!i) return 0; + pagenr--; } return &i->img; }