Index: trunk/src/plugins/io_easyeda/read_hi_pro.c =================================================================== --- trunk/src/plugins/io_easyeda/read_hi_pro.c (revision 10689) +++ trunk/src/plugins/io_easyeda/read_hi_pro.c (revision 10690) @@ -282,7 +282,6 @@ /* inverse-transform sheet coords specified in the file to parent group relative coords that the cschem model requires */ - TODO("this ignores mirroring"); tx = csch_alien_coord_x(&ctx->alien, x); ty = csch_alien_coord_y(&ctx->alien, y); csch_cgrp_inverse_xform(ctx->pro_last, &tx, &ty, 1); @@ -289,6 +288,11 @@ txt->spec1.x = tx; txt->spec1.y = ty; txt->spec_rot -= ctx->pro_last->spec_rot; + if (ctx->pro_last->mirx) { + txt->spec_mirx ^= 1; + if ((ctx->pro_last->spec_rot == 90) || (ctx->pro_last->spec_rot == 270)) + txt->spec_rot += 180; + } } return 0; @@ -673,12 +677,12 @@ return 0; } -/* "COMPONENT","e152","LM358.1",190,360,0, 0,{},0 - kw id symname x y rot? ? ? ? */ +/* "COMPONENT","e152","LM358.1",190,360,0, 0, {},0 + kw id symname x y rot mirx ? ? */ static int easypro_parse_component(read_ctx_t *ctx, gdom_node_t *obj, csch_cgrp_t *parent) { const char *symname; - double x, y, rot; + double x, y, rot, mirx; const csch_cgrp_t *src; csch_cgrp_t *dst; @@ -693,6 +697,7 @@ GET_ARG_DBL(x, obj, 3, "easypro_parse_component: coord x", return -1); GET_ARG_DBL(y, obj, 4, "easypro_parse_component: coord y", return -1); GET_ARG_DBL(rot, obj, 5, "easypro_parse_component: rotation", return -1); + GET_ARG_DBL(mirx, obj, 6, "easypro_parse_component: mirror-x", return -1); src = htsp_get(ctx->pro_symtab, symname); if (src == NULL) { @@ -708,6 +713,9 @@ dst->x = csch_alien_coord_x(&ctx->alien, x); dst->y = csch_alien_coord_y(&ctx->alien, y); dst->spec_rot = rot; + if (mirx) + dst->mirx = 1; + csch_cgrp_xform_update(ctx->sheet, dst); /* update the matrix so that children attribute transformations are done correctly */ ctx->pro_last = dst;