Module: wine Branch: master Commit: 491123e17bfb80ccac2a37771ebb257652efc076 URL: http://source.winehq.org/git/wine.git/?a=commit;h=491123e17bfb80ccac2a37771e...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Dec 5 17:32:35 2012 +0100
gdi32: Support getting character codes instead of glyphs in ExtTextOut for the path driver.
---
dlls/gdi32/path.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 38210ca..2c54e94 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -1511,10 +1511,11 @@ static BOOL pathdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, const REC LPCWSTR str, UINT count, const INT *dx ) { struct path_physdev *physdev = get_path_physdev( dev ); - unsigned int idx; + unsigned int idx, ggo_flags = GGO_NATIVE; POINT offset = {0, 0};
if (!count) return TRUE; + if (flags & ETO_GLYPH_INDEX) ggo_flags |= GGO_GLYPH_INDEX;
for (idx = 0; idx < count; idx++) { @@ -1523,8 +1524,7 @@ static BOOL pathdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, const REC DWORD dwSize; void *outline;
- dwSize = GetGlyphOutlineW(dev->hdc, str[idx], GGO_GLYPH_INDEX | GGO_NATIVE, - &gm, 0, NULL, &identity); + dwSize = GetGlyphOutlineW(dev->hdc, str[idx], ggo_flags, &gm, 0, NULL, &identity); if (dwSize == GDI_ERROR) return FALSE;
/* add outline only if char is printable */ @@ -1533,9 +1533,7 @@ static BOOL pathdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, const REC outline = HeapAlloc(GetProcessHeap(), 0, dwSize); if (!outline) return FALSE;
- GetGlyphOutlineW(dev->hdc, str[idx], GGO_GLYPH_INDEX | GGO_NATIVE, - &gm, dwSize, outline, &identity); - + GetGlyphOutlineW(dev->hdc, str[idx], ggo_flags, &gm, dwSize, outline, &identity); PATH_add_outline(physdev, x + offset.x, y + offset.y, outline, dwSize);
HeapFree(GetProcessHeap(), 0, outline);