From: Alvin Penner Date: Thu, 27 Jan 2011 23:42:51 +0000 (-0500) Subject: emf import : recalculate text alignment for rotated text (Bug 341847) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f9aec48f7047a3bef09beb3d61a4bb28e96cf17f;p=inkscape.git emf import : recalculate text alignment for rotated text (Bug 341847) --- diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp index d147a0c81..c817f6d46 100644 --- a/src/extension/internal/emf-win32-inout.cpp +++ b/src/extension/internal/emf-win32-inout.cpp @@ -1777,8 +1777,13 @@ myEnhMetaFileProc(HDC /*hDC*/, HANDLETABLE * /*lpHTable*/, ENHMETARECORD const * } if (!(d->dc[d->level].textAlign & TA_BOTTOM)) - y1 += fabs(d->dc[d->level].style.font_size.computed); - + if (d->dc[d->level].style.text_transform.value) { + x1 += std::sin(d->dc[d->level].style.text_transform.value*M_PI/180.0)*fabs(d->dc[d->level].style.font_size.computed); + y1 += std::cos(d->dc[d->level].style.text_transform.value*M_PI/180.0)*fabs(d->dc[d->level].style.font_size.computed); + } + else + y1 += fabs(d->dc[d->level].style.font_size.computed); + double x = pix_to_x_point(d, x1, y1); double y = pix_to_y_point(d, x1, y1);