Index: eps.c =================================================================== --- eps.c (revision 27607) +++ eps.c (revision 27608) @@ -214,13 +214,12 @@ fprintf(f, "%%%%EOF\n"); } -void eps_hid_export_to_file(FILE * the_file, pcb_hid_attr_val_t *options) +void eps_hid_export_to_file(FILE * the_file, pcb_hid_attr_val_t *options, pcb_xform_t *xform) { int i; static int saved_layer_stack[PCB_MAX_LAYER]; pcb_box_t tmp, region; pcb_hid_expose_ctx_t ctx; - pcb_xform_t *xform = NULL, xform_tmp; options_ = options; @@ -299,9 +298,7 @@ if (as_shown) { /* disable (exporter default) hiding overlay in as_shown */ - memset(&xform_tmp, 0, sizeof(xform_tmp)); - xform = &xform_tmp; - xform_tmp.omit_overlay = 0; + xform->omit_overlay = 0; } ctx.view = *bounds; @@ -318,6 +315,7 @@ { int i; int save_ons[PCB_MAX_LAYER]; + pcb_xform_t xform; if (!options) { eps_get_export_options(hid, 0); @@ -326,7 +324,7 @@ options = eps_values; } - pcb_cam_begin(PCB, &eps_cam, options[HA_cam].str, eps_attribute_list, NUM_OPTIONS, options); + pcb_cam_begin(PCB, &eps_cam, &xform, options[HA_cam].str, eps_attribute_list, NUM_OPTIONS, options); filename = options[HA_psfile].str; if (!filename) @@ -344,7 +342,7 @@ if ((!eps_cam.active) && (!options[HA_as_shown].lng)) pcb_hid_save_and_show_layer_ons(save_ons); - eps_hid_export_to_file(f, options); + eps_hid_export_to_file(f, options, &xform); if ((!eps_cam.active) && (!options[HA_as_shown].lng)) pcb_hid_restore_layer_ons(save_ons); Index: ps.c =================================================================== --- ps.c (revision 27607) +++ ps.c (revision 27608) @@ -521,7 +521,7 @@ /* This is used by other HIDs that use a postscript format, like lpr or eps. */ -void ps_hid_export_to_file(FILE * the_file, pcb_hid_attr_val_t * options) +void ps_hid_export_to_file(FILE * the_file, pcb_hid_attr_val_t * options, pcb_xform_t *xform) { static int saved_layer_stack[PCB_MAX_LAYER]; @@ -592,13 +592,13 @@ global.doing_toc = 1; global.pagecount = 1; /* 'pagecount' is modified by pcbhl_expose_main() call */ - pcbhl_expose_main(&ps_hid, &global.exps, NULL); + pcbhl_expose_main(&ps_hid, &global.exps, xform); } global.pagecount = 1; /* Reset 'pagecount' if single file */ global.doing_toc = 0; ps_set_layer_group(pcb_render, -1, NULL, -1, -1, 0, -1, NULL); /* reset static vars */ - pcbhl_expose_main(&ps_hid, &global.exps, NULL); + pcbhl_expose_main(&ps_hid, &global.exps, xform); if (the_file) fprintf(the_file, "showpage\n"); @@ -612,6 +612,7 @@ FILE *fh; int save_ons[PCB_MAX_LAYER]; int i; + pcb_xform_t xform; global.ovr_all = 0; @@ -622,7 +623,7 @@ options = global.ps_values; } - pcb_cam_begin(PCB, &ps_cam, options[HA_cam].str, ps_attribute_list, NUM_OPTIONS, options); + pcb_cam_begin(PCB, &ps_cam, &xform, options[HA_cam].str, ps_attribute_list, NUM_OPTIONS, options); global.filename = options[HA_psfile].str; if (!global.filename) @@ -651,7 +652,7 @@ if (!ps_cam.active) pcb_hid_save_and_show_layer_ons(save_ons); - ps_hid_export_to_file(fh, options); + ps_hid_export_to_file(fh, options, &xform); if (!ps_cam.active) pcb_hid_restore_layer_ons(save_ons); Index: ps.h =================================================================== --- ps.h (revision 27607) +++ ps.h (revision 27608) @@ -1,6 +1,6 @@ extern const char *ps_cookie; extern pcb_hid_t ps_hid; -extern void ps_hid_export_to_file(FILE *, pcb_hid_attr_val_t *); +extern void ps_hid_export_to_file(FILE *, pcb_hid_attr_val_t *, pcb_xform_t *); extern void ps_start_file(FILE *); extern void ps_calibrate_1(pcb_hid_t *hid, double, double, int); extern void hid_eps_init();