Index: svg.c =================================================================== --- svg.c (revision 31006) +++ svg.c (revision 31007) @@ -239,7 +239,7 @@ } if (photo_mode) { - pcb_fprintf(f, "\n", + rnd_fprintf(f, "\n", 0, 0, PCB->hidlib.size_x, PCB->hidlib.size_y, board_color); } @@ -304,7 +304,7 @@ y2 = PCB->hidlib.size_y; x2 += PCB_MM_TO_COORD(5); y2 += PCB_MM_TO_COORD(5); - pcb_fprintf(f, "\n", w, h, x1, y1, x2, y2); + rnd_fprintf(f, "\n", w, h, x1, y1, x2, y2); } static void svg_footer(void) @@ -497,10 +497,10 @@ case RND_HID_COMP_RESET: comp_cnt++; gds_init(&sclip); - pcb_append_printf(&snormal, "\n"); - pcb_append_printf(&snormal, "\n"); - pcb_append_printf(&snormal, "\n", comp_cnt); - pcb_append_printf(&sclip, "\n", comp_cnt, PCB->hidlib.size_x, PCB->hidlib.size_y); + rnd_append_printf(&snormal, "\n"); + rnd_append_printf(&snormal, "\n"); + rnd_append_printf(&snormal, "\n", comp_cnt); + rnd_append_printf(&sclip, "\n", comp_cnt, PCB->hidlib.size_x, PCB->hidlib.size_y); break; case RND_HID_COMP_POSITIVE: @@ -509,12 +509,12 @@ break; case RND_HID_COMP_FLUSH: - pcb_append_printf(&snormal, "\n"); - pcb_append_printf(&sclip, "\n"); + rnd_append_printf(&snormal, "\n"); + rnd_append_printf(&sclip, "\n"); gds_append_str(&snormal, sclip.array); - pcb_append_printf(&snormal, "\n"); - pcb_append_printf(&snormal, "\n", comp_cnt, comp_cnt); - pcb_append_printf(&snormal, "\n"); + rnd_append_printf(&snormal, "\n"); + rnd_append_printf(&snormal, "\n", comp_cnt, comp_cnt); + rnd_append_printf(&snormal, "\n"); gds_uninit(&sclip); break; } @@ -572,17 +572,17 @@ if (group_open < sizeof(ind)-1) { ind[group_open] = '\0'; if (s == NULL) - pcb_fprintf(f, ind); + rnd_fprintf(f, ind); else - pcb_append_printf(s, ind); + rnd_append_printf(s, ind); ind[group_open] = ' '; return; } if (s == NULL) - pcb_fprintf(f, ind); + rnd_fprintf(f, ind); else - pcb_append_printf(s, ind); + rnd_append_printf(s, ind); } static void svg_set_draw_xor(rnd_hid_gc_t gc, int xor_) @@ -607,11 +607,11 @@ const char *clip_color = svg_clip_color(gc); indent(&snormal); - pcb_append_printf(&snormal, "\n", + rnd_append_printf(&snormal, "\n", x1, y1, w, h, stroke, svg_color(gc), CAPS(gc->cap)); if (clip_color != NULL) { indent(&sclip); - pcb_append_printf(&sclip, "\n", + rnd_append_printf(&sclip, "\n", x1, y1, w, h, stroke, clip_color, CAPS(gc->cap)); } } @@ -630,22 +630,22 @@ rnd_coord_t photo_offs = photo_palette[photo_color].offs; if (photo_offs != 0) { indent(&sdark); - pcb_append_printf(&sdark, "\n", + rnd_append_printf(&sdark, "\n", x1+photo_offs, y1+photo_offs, w, h, photo_palette[photo_color].dark); indent(&sbright); - pcb_append_printf(&sbright, "\n", + rnd_append_printf(&sbright, "\n", x1-photo_offs, y1-photo_offs, w, h, photo_palette[photo_color].bright); } indent(&snormal); - pcb_append_printf(&snormal, "\n", + rnd_append_printf(&snormal, "\n", x1, y1, w, h, photo_palette[photo_color].normal); } else { indent(&snormal); - pcb_append_printf(&snormal, "\n", + rnd_append_printf(&snormal, "\n", x1, y1, w, h, svg_color(gc)); if (clip_color != NULL) - pcb_append_printf(&sclip, "\n", + rnd_append_printf(&sclip, "\n", x1, y1, w, h, clip_color); } } @@ -665,22 +665,22 @@ rnd_coord_t photo_offs = photo_palette[photo_color].offs; if (photo_offs != 0) { indent(&sbright); - pcb_append_printf(&sbright, "\n", + rnd_append_printf(&sbright, "\n", x1-photo_offs, y1-photo_offs, x2-photo_offs, y2-photo_offs, gc->width, photo_palette[photo_color].bright, CAPS(gc->cap)); indent(&sdark); - pcb_append_printf(&sdark, "\n", + rnd_append_printf(&sdark, "\n", x1+photo_offs, y1+photo_offs, x2+photo_offs, y2+photo_offs, gc->width, photo_palette[photo_color].dark, CAPS(gc->cap)); } indent(&snormal); - pcb_append_printf(&snormal, "\n", + rnd_append_printf(&snormal, "\n", x1, y1, x2, y2, gc->width, photo_palette[photo_color].normal, CAPS(gc->cap)); } else { indent(&snormal); - pcb_append_printf(&snormal, "\n", + rnd_append_printf(&snormal, "\n", x1, y1, x2, y2, gc->width, svg_color(gc), CAPS(gc->cap)); if (clip_color != NULL) { - pcb_append_printf(&sclip, "\n", + rnd_append_printf(&sclip, "\n", x1, y1, x2, y2, gc->width, clip_color, CAPS(gc->cap)); } } @@ -700,22 +700,22 @@ rnd_coord_t photo_offs = photo_palette[photo_color].offs; if (photo_offs != 0) { indent(&sbright); - pcb_append_printf(&sbright, "\n", + rnd_append_printf(&sbright, "\n", x1-photo_offs, y1-photo_offs, r, r, large, sweep, x2-photo_offs, y2-photo_offs, gc->width, photo_palette[photo_color].bright, CAPS(gc->cap)); indent(&sdark); - pcb_append_printf(&sdark, "\n", + rnd_append_printf(&sdark, "\n", x1+photo_offs, y1+photo_offs, r, r, large, sweep, x2+photo_offs, y2+photo_offs, gc->width, photo_palette[photo_color].dark, CAPS(gc->cap)); } indent(&snormal); - pcb_append_printf(&snormal, "\n", + rnd_append_printf(&snormal, "\n", x1, y1, r, r, large, sweep, x2, y2, gc->width, photo_palette[photo_color].normal, CAPS(gc->cap)); } else { indent(&snormal); - pcb_append_printf(&snormal, "\n", + rnd_append_printf(&snormal, "\n", x1, y1, r, r, large, sweep, x2, y2, gc->width, svg_color(gc), CAPS(gc->cap)); if (clip_color != NULL) - pcb_append_printf(&sclip, "\n", + rnd_append_printf(&sclip, "\n", x1, y1, r, r, large, sweep, x2, y2, gc->width, clip_color, CAPS(gc->cap)); } } @@ -790,29 +790,29 @@ rnd_coord_t photo_offs = photo_palette[photo_color].offs; if ((!gc->drill) && (photo_offs != 0)) { indent(&sbright); - pcb_append_printf(&sbright, "\n", + rnd_append_printf(&sbright, "\n", cx-photo_offs, cy-photo_offs, r, stroke, photo_palette[photo_color].bright); indent(&sdark); - pcb_append_printf(&sdark, "\n", + rnd_append_printf(&sdark, "\n", cx+photo_offs, cy+photo_offs, r, stroke, photo_palette[photo_color].dark); } indent(&snormal); - pcb_append_printf(&snormal, "\n", + rnd_append_printf(&snormal, "\n", cx, cy, r, stroke, photo_palette[photo_color].normal); } else { indent(&snormal); - pcb_append_printf(&snormal, "\n", + rnd_append_printf(&snormal, "\n", cx, cy, r, stroke, "#000000"); } } else{ indent(&snormal); - pcb_append_printf(&snormal, "\n", + rnd_append_printf(&snormal, "\n", cx, cy, r, stroke, svg_color(gc)); if (clip_color != NULL) - pcb_append_printf(&sclip, "\n", + rnd_append_printf(&sclip, "\n", cx, cy, r, stroke, clip_color); } } @@ -834,9 +834,9 @@ for (i = 0; i < n_coords; i++) { rnd_coord_t px = x[i], py = y[i]; TRX(px); TRY(py); - pcb_append_printf(s, "%mm,%mm ", px+dx, py+dy); + rnd_append_printf(s, "%mm,%mm ", px+dx, py+dy); } - pcb_append_printf(s, "\" stroke-width=\"%.3f\" stroke=\"%s\" fill=\"%s\"/>\n", poly_bloat, clr, clr); + rnd_append_printf(s, "\" stroke-width=\"%.3f\" stroke=\"%s\" fill=\"%s\"/>\n", poly_bloat, clr, clr); } static void svg_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy)