Index: trunk/src/plugins/io_easyeda/read_hi_pro.c =================================================================== --- trunk/src/plugins/io_easyeda/read_hi_pro.c (revision 10687) +++ trunk/src/plugins/io_easyeda/read_hi_pro.c (revision 10688) @@ -255,10 +255,11 @@ /* create a floater if anything is visible */ if (kvis || vvis) { const char *penname = DECOR_PEN_NAME(ctx->pro_last); + csch_coord_t tx, ty; csch_text_t *txt; + g2d_xform_t imx; - - txt = (csch_text_t *)csch_alien_mktext(&ctx->alien, ctx->pro_last, x, y, penname); + txt = (csch_text_t *)csch_alien_mktext(&ctx->alien, ctx->pro_last, 0, 0, penname); txt->dyntext = 1; if (ctx->pro_last->role == CSCH_ROLE_SYMBOL) txt->hdr.floater = 1; @@ -278,6 +279,16 @@ error_at(ctx, obj, ("easypro_parse_attr: invalid rotation angle %f\n", rot)); return -1; } + + /* 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); + txt->spec1.x = tx; + txt->spec1.y = ty; + txt->spec_rot -= ctx->pro_last->spec_rot; } return 0; @@ -696,6 +707,8 @@ } dst->x = csch_alien_coord_x(&ctx->alien, x); dst->y = csch_alien_coord_y(&ctx->alien, y); + dst->spec_rot = rot; + csch_cgrp_xform_update(ctx->sheet, dst); /* update the matrix so that children attribute transformations are done correctly */ ctx->pro_last = dst; return 0;