[2/4] gdi32: Fix text rotation problem in GM_ADVANCED graphics mode.

Nikolay Sivov bunglehead at gmail.com
Tue Jan 7 07:56:10 CST 2014


On 1/7/2014 17:33, Ralf Habacker wrote:
> This patch detects operational condition first and then removes
> temporary rotation from the world transform.
> Bug: http://bugs.winehq.org/show_bug.cgi?id=33190
> ---
>   dlls/gdi32/font.c | 19 +++++++++++++++++++
>   1 file changed, 19 insertions(+)
>
> +    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 );
> +        }
> +    }
> +
Flag really means do we need to restore transform or not.

> +    if ( GetGraphicsMode( hdc ) == GM_ADVANCED && exclude_rotation == TRUE )
> +    {
> +        SetWorldTransform( hdc, &old );
> +    }
> +
Doesn't look like you need to check a mode again.



More information about the wine-devel mailing list