INTEGRATION: CWS thbpp5 (1.13.4); FILE MERGED

2006/10/13 20:00:31 thb 1.13.4.1: #i68512# Fixed double-rotation of outline text glyphs
This commit is contained in:
Vladimir Glazounov
2006-11-01 16:48:18 +00:00
parent 2f1842160c
commit 0366f3a471

View File

@@ -4,9 +4,9 @@
*
* $RCSfile: textaction.cxx,v $
*
* $Revision: 1.14 $
* $Revision: 1.15 $
*
* last change: $Author: obo $ $Date: 2006-10-12 15:00:26 $
* last change: $Author: vg $ $Date: 2006-11-01 17:48:18 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1966,16 +1966,29 @@ namespace cppcanvas
// PolyPolygon. That polygon is then converted to
// device coordinate system.
// #i68512# Temporarily switch off font rotation
// (which is already contained in the render state
// transformation matrix - otherwise, glyph polygons
// will be rotated twice)
const ::Font aOrigFont( rVDev.GetFont() );
::Font aUnrotatedFont( aOrigFont );
aUnrotatedFont.SetOrientation(0);
rVDev.SetFont( aUnrotatedFont );
// TODO(F3): Don't understand parameter semantics of
// GetTextOutlines()
::PolyPolygon aResultingVCLPolyPolygon;
PolyPolyVector aVCLPolyPolyVector;
if( rVDev.GetTextOutlines( aVCLPolyPolyVector, rText,
const bool bHaveOutlines( rVDev.GetTextOutlines( aVCLPolyPolyVector, rText,
static_cast<USHORT>(nStartPos),
static_cast<USHORT>(nStartPos),
static_cast<USHORT>(nLen),
TRUE, 0, pDXArray ) )
{
TRUE, 0, pDXArray ) );
rVDev.SetFont(aOrigFont);
if( !bHaveOutlines )
return ActionSharedPtr();
::std::vector< sal_Int32 > aPolygonGlyphMap;
// first glyph starts at polygon index 0
@@ -2104,10 +2117,7 @@ namespace cppcanvas
}
}
return ActionSharedPtr();
}
}
} // namespace
// ---------------------------------------------------------------------------------