diff options
author | Sven Jacobi <sj@openoffice.org> | 2001-05-07 15:07:29 +0000 |
---|---|---|
committer | Sven Jacobi <sj@openoffice.org> | 2001-05-07 15:07:29 +0000 |
commit | 05d0314e3e0f80e3fe51ed282e15b46ef20d2ece (patch) | |
tree | 80a3bc8593f7f923e86f3ab85e4dd37f3773696f /goodies | |
parent | 4f64da3840925f0e7b1ce92fdecc2ffbe8136d7f (diff) |
#74306# supporting glyph outlines: take care of font alignment
Diffstat (limited to 'goodies')
-rw-r--r-- | goodies/source/filter.vcl/eps/eps.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/goodies/source/filter.vcl/eps/eps.cxx b/goodies/source/filter.vcl/eps/eps.cxx index 6b24babe308b..c8eeb112e856 100644 --- a/goodies/source/filter.vcl/eps/eps.cxx +++ b/goodies/source/filter.vcl/eps/eps.cxx @@ -2,9 +2,9 @@ * * $RCSfile: eps.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sj $ $Date: 2001-05-07 14:31:31 $ + * last change: $Author: sj $ $Date: 2001-05-07 16:07:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1898,27 +1898,34 @@ void PSWriter::ImplText( const String& rUniString, const Point& rPos, const INT3 Size aSize( aVirDev.GetTextWidth( nChar ), aNormSize.Height() ); switch( maFont.GetAlign() ) { - case( ALIGN_TOP ): - aPos.Y() += aMetric.GetAscent(); + case( ALIGN_TOP ) : break; - case( ALIGN_BOTTOM ): - aPos.Y() -= aMetric.GetDescent(); + case( ALIGN_BOTTOM ) : + aPos.Y() -= aMetric.GetLineHeight(); break; default: + case ( ALIGN_BASELINE ) : + aPos.Y() -= aMetric.GetAscent(); break; } + if ( nRotation ) + { + aPolyDummy.SetPoint( aPos, 0 ); + aPolyDummy.Rotate( rPos, nRotation ); + aPos = aPolyDummy.GetPoint( 0 ); + } if ( aVirDev.GetGlyphOutline( nChar, aPolyPoly, sal_True ) ) { ImplWriteLine( "pum" ); + // always adjust text position to match baseline alignment + ImplTranslate( aPos.X() * fXScaling + fXOrigin, aPos.Y() * fYScaling + fYOrigin ); if ( nRotation ) { ImplWriteF( nRotation, 1 ); *mpPS << "r "; } - // always adjust text position to match baseline alignment - ImplTranslate( aPos.X() * fXScaling + fXOrigin, aPos.Y() * fYScaling + fYOrigin ); ImplPolyPoly( aPolyPoly, sal_True ); ImplWriteLine( "pom" ); } |