diff options
| author | Alvin Penner <penner@vaxxine.com> | 2011-01-07 23:44:43 +0000 |
|---|---|---|
| committer | Alvin Penner <penner@vaxxine.com> | 2011-01-07 23:44:43 +0000 |
| commit | dc22b6046af378167f9bfbb248a2e3e82444f8e7 (patch) | |
| tree | ca4089e623063d2822c50691c8226fd32628ead4 /src | |
| parent | Export. Fix PS/EPS export (Bug #698340, PS Level Restriction reversed. (diff) | |
| download | inkscape-dc22b6046af378167f9bfbb248a2e3e82444f8e7.tar.gz inkscape-dc22b6046af378167f9bfbb248a2e3e82444f8e7.zip | |
Export. add emf text rotation (Bug 681262)
Fixed bugs:
- https://launchpad.net/bugs/681262
(bzr r10001)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/emf-win32-print.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/extension/internal/emf-win32-print.cpp b/src/extension/internal/emf-win32-print.cpp index c7f8e3d4c..e1ef77ae5 100644 --- a/src/extension/internal/emf-win32-print.cpp +++ b/src/extension/internal/emf-win32-print.cpp @@ -863,6 +863,8 @@ PrintEmfWin32::text(Inkscape::Extension::Print * /*mod*/, char const *text, Geom if (!hdc) return 0; HFONT hfont = NULL; + Geom::Matrix tf = m_tr_stack.top(); + double rot = 1800.0*std::atan2(tf[1], tf[0])/M_PI; // 0.1 degree rotation #ifdef USE_PANGO_WIN32 /* @@ -883,8 +885,8 @@ PrintEmfWin32::text(Inkscape::Extension::Print * /*mod*/, char const *text, Geom lf->lfHeight = style->font_size.computed * IN_PER_PX * dwDPI; lf->lfWidth = 0; - lf->lfEscapement = 0; - lf->lfOrientation = 0; + lf->lfEscapement = rot; + lf->lfOrientation = rot; lf->lfWeight = style->font_weight.computed == SP_CSS_FONT_WEIGHT_100 ? FW_THIN : style->font_weight.computed == SP_CSS_FONT_WEIGHT_200 ? FW_EXTRALIGHT : @@ -919,8 +921,8 @@ PrintEmfWin32::text(Inkscape::Extension::Print * /*mod*/, char const *text, Geom lf->lfHeight = style->font_size.computed * IN_PER_PX * dwDPI; lf->lfWidth = 0; - lf->lfEscapement = 0; - lf->lfOrientation = 0; + lf->lfEscapement = rot; + lf->lfOrientation = rot; lf->lfWeight = style->font_weight.computed == SP_CSS_FONT_WEIGHT_100 ? FW_THIN : style->font_weight.computed == SP_CSS_FONT_WEIGHT_200 ? FW_EXTRALIGHT : @@ -964,8 +966,6 @@ PrintEmfWin32::text(Inkscape::Extension::Print * /*mod*/, char const *text, Geom // Transparent text background SetBkMode(hdc, TRANSPARENT); - Geom::Matrix tf = m_tr_stack.top(); - p = p * tf; p[Geom::X] = (p[Geom::X] * IN_PER_PX * dwDPI); p[Geom::Y] = (p[Geom::Y] * IN_PER_PX * dwDPI); |
