implemented asset resolving
[swftools.git] / lib / gfxtools.c
index 2e080de..0869455 100644 (file)
@@ -234,7 +234,7 @@ void gfxtool_draw_dashed_line(gfxdrawer_t*d, gfxline_t*line, float*r, float phas
         return;
     }
     if(r[0]<0 || phase<0) {
-       fprintf(stderr, "gfxtool: invalid (negative) dashes: %f, phase=%f", r[0], phase);
+       fprintf(stderr, "gfxtool: invalid (negative) dashes: %f, phase=%f\n", r[0], phase);
        return;
     }
 
@@ -728,8 +728,8 @@ void gfxline_transform(gfxline_t*line, gfxmatrix_t*matrix)
 
 void gfxmatrix_dump(gfxmatrix_t*m, FILE*fi, char*prefix)
 {
-    fprintf(fi, "%f %f | %f\n", m->m00, m->m10, m->tx);
-    fprintf(fi, "%f %f | %f\n", m->m01, m->m11, m->ty);
+    fprintf(fi, "%s%f %f | %f\n", prefix, m->m00, m->m10, m->tx);
+    fprintf(fi, "%s%f %f | %f\n", prefix, m->m01, m->m11, m->ty);
 }
 
 void gfxmatrix_transform(gfxmatrix_t*m, double* v, double*dest)
@@ -1137,21 +1137,6 @@ gfxline_t* gfxline_reverse(gfxline_t*line)
     return b;
 }
 
-void gfximage_save_jpeg(gfximage_t*img, char*filename, int quality)
-{
-    unsigned char*data = malloc(img->width*img->height*3);
-    int t;
-    int size = img->width*img->height;
-    int s = 0;
-    for(t=0;t<size;t++) {
-       data[s+0] = img->data[t].r;
-       data[s+1] = img->data[t].g;
-       data[s+2] = img->data[t].b;
-       s+=3;
-    }
-    jpeg_save(data, img->width, img->height, quality, filename);
-}
-
 gfxparams_t* gfxparams_new()
 {
     return (gfxparams_t*)rfx_calloc(sizeof(gfxparams_t));