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;
}
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)
gfxline_t*prev=0;
while(line) {
gfxline_t*next = line->next;
- if(line->type == gfx_moveTo) {
+ if(line->type == gfx_moveTo && (line->next && line->next->type != gfx_moveTo)) {
gfxpoint_t xy = {line->x, line->y};
dict_put(ff, &xy, line);
prev = line;
free(p);
p = next;
}
+ free(params);
}