Index: trunk/src_plugins/lib_compat_help/pstk_compat.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 23628) +++ trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 23629) @@ -583,6 +583,8 @@ if (tshp->shape[0].shape == PCB_PSSH_POLY) { for(n = 0; n < tshp->len; n++) { pcb_coord_t w, h, x1, x2, y1, y2; + double stepd, step2; + int step; if (tshp->shape[n].shape != PCB_PSSH_POLY) continue; @@ -590,6 +592,12 @@ if (tshp->shape[n].data.poly.len != 4) return pcb_false; + stepd = ps->rot / 90.0; + step = stepd; + step2 = (double)step * 90.0; + if (fabs(ps->rot - step2) > 0.01) + return pcb_false; + x1 = tshp->shape[n].data.poly.x[0]; x2 = tshp->shape[n].data.poly.x[2]; if (x1 < x2) { @@ -602,8 +610,14 @@ y2 = tshp->shape[n].data.poly.y[0]; y1 = tshp->shape[n].data.poly.y[2]; } - w = x1 - x2; - h = y1 - y2; + if ((step % 2) == 1) { + h = x1 - x2; + w = y1 - y2; + } + else { + w = x1 - x2; + h = y1 - y2; + } lt[n] = (w < h) ? w : h; lx1[n] = x2 + lt[n] / 2; ly1[n] = y2 + lt[n] / 2;