Index: 2.2.3/src/obj_text.c =================================================================== --- 2.2.3/src/obj_text.c (revision 32174) +++ 2.2.3/src/obj_text.c (revision 32175) @@ -266,9 +266,10 @@ /* calculate final placement and enable rotation */ if (mirror & PCB_TXT_MIRROR_X) mx = -1; if (mirror & PCB_TXT_MIRROR_Y) my = -1; - rot = rot * mx *my; - cs = cos(rot / RND_RAD_TO_DEG); - sn = sin(rot / RND_RAD_TO_DEG); + + cs = cos(rot*mx*my / RND_RAD_TO_DEG); + sn = sin(rot*mx*my / RND_RAD_TO_DEG); + t->X = X - (nanchx * cs * mx + nanchy * sn * my); t->Y = Y - (nanchy * cs * my - nanchx * sn * mx); t->rot = rot; @@ -520,10 +521,10 @@ /* it is enough to do the transformations only once, on the raw bounding box */ pcb_xform_mx_translate(mx, Text->X, Text->Y); + if (mirror != PCB_TXT_MIRROR_NO) + pcb_xform_mx_scale(mx, (mirror & PCB_TXT_MIRROR_X) ? -1 : 1, (mirror & PCB_TXT_MIRROR_Y) ? -1 : 1); pcb_xform_mx_rotate(mx, Text->rot); pcb_xform_mx_scale(mx, scx, scy); - if (mirror != PCB_TXT_MIRROR_NO) - pcb_xform_mx_scale(mx, (mirror & PCB_TXT_MIRROR_X) ? -1 : 1, (mirror & PCB_TXT_MIRROR_Y) ? -1 : 1); /* calculate the transformed coordinates of all 4 corners of the raw (non-axis-aligned) bounding box */ @@ -1323,10 +1324,10 @@ pcb_xform_mx_t mx = PCB_XFORM_MX_IDENT; pcb_xform_mx_translate(mx, x0, y0); + if (mirror != PCB_TXT_MIRROR_NO) + pcb_xform_mx_scale(mx, (mirror & PCB_TXT_MIRROR_X) ? -1 : 1, (mirror & PCB_TXT_MIRROR_Y) ? -1 : 1); pcb_xform_mx_rotate(mx, rotdeg); pcb_xform_mx_scale(mx, scx, scy); - if (mirror != PCB_TXT_MIRROR_NO) - pcb_xform_mx_scale(mx, (mirror & PCB_TXT_MIRROR_X) ? -1 : 1, (mirror & PCB_TXT_MIRROR_Y) ? -1 : 1); /* Text too small at this zoom level: cheap draw */ if ((tiny != PCB_TXT_TINY_ACCURATE) && (cb == NULL)) {