X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fdevices%2Fpdf.c;h=c1484bb4a9e84296e4e26c4d30e19221097264f7;hp=1e0d6a8b829cfc3041758ee56c947cca617aa3c7;hb=b7121844bf21b1c022aaeb26cd4c98148ab1ed29;hpb=caada7c5e05d789bde96929491f6fa2cfacac6fc diff --git a/lib/devices/pdf.c b/lib/devices/pdf.c index 1e0d6a8..c1484bb 100644 --- a/lib/devices/pdf.c +++ b/lib/devices/pdf.c @@ -64,6 +64,10 @@ static void restore_matrix(internal_t*i) if(i->has_matrix) { PDF_restore(i->p); i->has_matrix=0; + i->m00 = 0; + i->m01 = 0; + i->m10 = 0; + i->m11 = 0; } } static void set_matrix(internal_t*i, double m00, double m01, double m10, double m11) @@ -100,7 +104,7 @@ void pdf_startpage(gfxdevice_t*dev, int width, int height) internal_t*i = (internal_t*)dev->internal; if(!i->tempfile) { - i->tempfile = strdup(mktempname(0)); + i->tempfile = strdup(mktempname(0, "pdf")); PDF_begin_document(i->p, i->tempfile, 0, ""); //PDF_set_value(i->p, "compress", 0); @@ -281,14 +285,14 @@ void pdf_fillbitmap(gfxdevice_t*dev, gfxline_t*line, gfximage_t*img, gfxmatrix_t } char tempfile[128]; - mktempname(tempfile); + mktempname(tempfile, "jpg"); gfximage_save_jpeg(img, tempfile, 96); int imgid=-1; if(has_alpha) { char tempfile2[128]; - mktempname(tempfile2); + mktempname(tempfile2, "jpg"); int t; int size = img->width*img->height; unsigned char*alpha = malloc(size);