gdiplus: Add support for extra transformation in GdipMeasureDriverString and GdipDrawDriverString.

Vincent Povirk madewokherd at gmail.com
Wed Oct 31 10:12:13 CDT 2012


> @@ -6337,6 +6345,11 @@ GpStatus WINGDIPAPI GdipMeasureDriverString(GpGraphics *graphics, GDIPCONST UINT
>      pt[2].X = 0.0;
>      pt[2].Y = 1.0;
>      GdipTransformPoints(graphics, CoordinateSpaceDevice, CoordinateSpaceWorld, pt, 3);
> +    if (matrix)
> +    {
> +        GpMatrix xform = *matrix;
> +        GdipTransformMatrixPoints(&xform, pt, 3);
> +    }
>      rel_width = sqrt((pt[1].Y-pt[0].Y)*(pt[1].Y-pt[0].Y)+
>                       (pt[1].X-pt[0].X)*(pt[1].X-pt[0].X));
>      rel_height = sqrt((pt[2].Y-pt[0].Y)*(pt[2].Y-pt[0].Y)+

Without tests, I can only guess, but I think it's more likely that
this matrix transform should be applied before the world->device
transform.

Apart from questions of whether this is correct behavior, the patch
looks good to me.



More information about the wine-devel mailing list