Index: trunk/src/obj_pstk.h =================================================================== --- trunk/src/obj_pstk.h (revision 19530) +++ trunk/src/obj_pstk.h (revision 19531) @@ -191,6 +191,10 @@ for the new shape. If dst_idx is -1, allocate the new shape */ void pcb_pstk_shape_derive(pcb_pstk_proto_t *proto, int dst_idx, int src_idx, pcb_coord_t bloat, pcb_layer_type_t mask, pcb_layer_combining_t comb); +/* Create a new hshadow shape (in all transformed shape as well) */ +void pcb_pstk_shape_add_hshadow(pcb_pstk_proto_t *proto, pcb_layer_type_t mask, pcb_layer_combining_t comb); + + /* Look up the shape index corresponding to a lty/comb; returns -1 if not found/empty */ int pcb_pstk_get_shape_idx(pcb_pstk_tshape_t *ts, pcb_layer_type_t lyt, pcb_layer_combining_t comb); Index: trunk/src/obj_pstk_proto.c =================================================================== --- trunk/src/obj_pstk_proto.c (revision 19530) +++ trunk/src/obj_pstk_proto.c (revision 19531) @@ -1016,7 +1016,23 @@ pcb_pstk_proto_update(proto); } +void pcb_pstk_shape_add_hshadow(pcb_pstk_proto_t *proto, pcb_layer_type_t mask, pcb_layer_combining_t comb) +{ + int n; + /* do the same on all shapes of all transformed variants */ + for(n = 0; n < proto->tr.used; n++) { + int d = proto->tr.array[n].len; + proto->tr.array[n].len++; + proto->tr.array[n].shape = realloc(proto->tr.array[n].shape, proto->tr.array[n].len * sizeof(proto->tr.array[n].shape[0])); + proto->tr.array[n].shape[d].shape = PCB_PSSH_HSHADOW; + proto->tr.array[n].shape[d].layer_mask = mask; + proto->tr.array[n].shape[d].comb = comb; + } + pcb_pstk_proto_update(proto); +} + + static void pcb_pstk_tshape_del_idx(pcb_pstk_tshape_t *shp, int idx) { int n;