[2/4] gdi32: Fix text rotation problem in GM_ADVANCED graphics mode.
On Tue, Jan 07, 2014 at 02:33:32PM +0100, Ralf Habacker wrote:
@@ -1327,6 +1327,20 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, INT max_ext, } }
+ XFORM old; + BOOL exclude_rotation = FALSE; + if ( GetGraphicsMode( hdc ) == GM_ADVANCED ) + { + GetWorldTransform( hdc, &old ); + XFORM xf = old; + if ( hasRotatedAndSameScaledMatrixOnly( &xf ) ) + { + exclude_rotation = TRUE; + removeRotationFromMatrix( &xf, NULL ); + SetWorldTransform( hdc, &xf ); + } + }
Does Windows really do this only in the same-scaled, non-sheared case?
The updated patch http://www.winehq.org/pipermail/wine-patches/2014-January/129505.html contains a related hint from the developer: "Note: The current implementation only works on matrixes with uniform scale and shear, which has to be checked by a call to xform_has_rotate_and_uniform_scale_and_shear(). Hints how to get *unique* values for non-uniform matrixes are welcome." The application, for which the patch has been written (http://appdb.winehq.org/objectManager.php?sClass=application&iId=13649) works fine with this patches, as it only uses dc rotatation. Regards Ralf
participants (1)
-
Ralf Habacker