Index: svg.c =================================================================== --- svg.c (revision 35372) +++ svg.c (revision 35373) @@ -42,6 +42,7 @@ #include #include +#include #include "board.h" #include "data.h" #include "draw.h" @@ -245,8 +246,17 @@ photo_noise = 0; if (options[HA_flip].lng) { + rnd_layer_id_t topcop[32]; + int n, v; + flip = 1; rnd_conf_force_set_bool(conf_core.editor.show_solder_side, 1); + + /* make sure bottom side copper is top on visibility so it is rendered last */ + pcb_layervis_save_stack(); + v = pcb_layer_list(PCB, PCB_LYT_BOTTOM | PCB_LYT_COPPER, topcop, sizeof(topcop)/sizeof(topcop[0])); + for(n = 0; n < v; n++) + pcb_layervis_change_group_vis(&PCB->hidlib, topcop[n], 1, 1); } else flip = 0; @@ -274,6 +284,8 @@ rnd_app.expose_main(&svg_hid, &ctx, xform); + if (flip) + pcb_layervis_restore_stack(); rnd_conf_update(NULL, -1); /* restore forced sets */ } @@ -439,6 +451,8 @@ svg_header(); } +printf("GRP: '%s'\n", PCB->LayerGroups.grp[group].name); + if (!svg_cam.active) { if (flags & PCB_LYT_INVIS) return 0; @@ -501,7 +515,6 @@ } drawing_hole = PCB_LAYER_IS_DRILL(flags, purpi); - return 1; }