Commit cfc50b28 authored by David Kahurani's avatar David Kahurani Committed by Alexandre Julliard

gdiplus/font: Fix GdipGetLogFontW/A with gdi_transform.

parent 062ef22c
......@@ -485,6 +485,8 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW
pt[1].Y = 0.0;
pt[2].X = 0.0;
pt[2].Y = 1.0;
GdipMultiplyMatrix(&matrix, &graphics->gdi_transform, MatrixOrderAppend);
GdipTransformMatrixPoints(&matrix, pt, 3);
angle = -gdiplus_atan2((pt[1].Y - pt[0].Y), (pt[1].X - pt[0].X));
rel_height = sqrt((pt[2].Y - pt[0].Y) * (pt[2].Y - pt[0].Y)+
......
......@@ -1239,6 +1239,20 @@ static void test_font_transform(void)
todo_wine
expectf_(1532.984985, bounds.Height, 0.05);
GdipDeleteGraphics(graphics);
SetMapMode( hdc, MM_ISOTROPIC);
SetWindowExtEx(hdc, 200, 200, NULL);
SetViewportExtEx(hdc, 100, 100, NULL);
status = GdipCreateFromHDC(hdc, &graphics);
expect(Ok, status);
status = GdipGetLogFontA(font, graphics, &lf);
expect(Ok, status);
expect(-50, lf.lfHeight);
expect(0, lf.lfWidth);
expect(0, lf.lfEscapement);
expect(0, lf.lfOrientation);
GdipDeleteMatrix(matrix);
GdipDeleteFont(font);
GdipDeleteGraphics(graphics);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment