gdi32: The MAT2 parameter of GetGlyphOutline is mandatory.

This commit is contained in:
Dmitry Timoshkov 2009-02-03 17:55:05 +08:00 committed by Alexandre Julliard
parent ba660a47ce
commit 44589c6f8f
2 changed files with 12 additions and 8 deletions

View File

@ -1983,12 +1983,15 @@ DWORD WINAPI GetGlyphOutline16( HDC16 hdc, UINT16 uChar, UINT16 fuFormat,
GLYPHMETRICS gm32;
ret = GetGlyphOutlineA( HDC_32(hdc), uChar, fuFormat, &gm32, cbBuffer, lpBuffer, lpmat2);
lpgm->gmBlackBoxX = gm32.gmBlackBoxX;
lpgm->gmBlackBoxY = gm32.gmBlackBoxY;
lpgm->gmptGlyphOrigin.x = gm32.gmptGlyphOrigin.x;
lpgm->gmptGlyphOrigin.y = gm32.gmptGlyphOrigin.y;
lpgm->gmCellIncX = gm32.gmCellIncX;
lpgm->gmCellIncY = gm32.gmCellIncY;
if (ret && ret != GDI_ERROR)
{
lpgm->gmBlackBoxX = gm32.gmBlackBoxX;
lpgm->gmBlackBoxY = gm32.gmBlackBoxY;
lpgm->gmptGlyphOrigin.x = gm32.gmptGlyphOrigin.x;
lpgm->gmptGlyphOrigin.y = gm32.gmptGlyphOrigin.y;
lpgm->gmCellIncX = gm32.gmCellIncX;
lpgm->gmCellIncY = gm32.gmCellIncY;
}
return ret;
}

View File

@ -1454,17 +1454,18 @@ BOOL PATH_ExtTextOut(DC *dc, INT x, INT y, UINT flags, const RECT *lprc,
for (idx = 0; idx < count; idx++)
{
static const MAT2 identity = { {0,1},{0,0},{0,0},{0,1} };
GLYPHMETRICS gm;
DWORD dwSize;
void *outline;
dwSize = GetGlyphOutlineW(hdc, str[idx], GGO_GLYPH_INDEX | GGO_NATIVE, &gm, 0, NULL, NULL);
dwSize = GetGlyphOutlineW(hdc, str[idx], GGO_GLYPH_INDEX | GGO_NATIVE, &gm, 0, NULL, &identity);
if (!dwSize) return FALSE;
outline = HeapAlloc(GetProcessHeap(), 0, dwSize);
if (!outline) return FALSE;
GetGlyphOutlineW(hdc, str[idx], GGO_GLYPH_INDEX | GGO_NATIVE, &gm, dwSize, outline, NULL);
GetGlyphOutlineW(hdc, str[idx], GGO_GLYPH_INDEX | GGO_NATIVE, &gm, dwSize, outline, &identity);
PATH_add_outline(dc, org.x + x + xoff, org.x + y + yoff, outline, dwSize);