mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 01:14:47 +00:00
gdi32: Use NtGdiGetGlyphOutlineW for GetGlyphOutlineW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9fe27a704d
commit
c221571468
|
@ -5646,61 +5646,25 @@ BOOL WINAPI NtGdiGetCharABCWidthsW( HDC hdc, UINT first, UINT last, WCHAR *chars
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetGlyphOutlineA (GDI32.@)
|
* NtGdiGetGlyphOutlineW (win32u.@)
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT uChar, UINT fuFormat,
|
DWORD WINAPI NtGdiGetGlyphOutlineW( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *metrics,
|
||||||
LPGLYPHMETRICS lpgm, DWORD cbBuffer,
|
DWORD size, void *buffer, const MAT2 *mat2,
|
||||||
LPVOID lpBuffer, const MAT2 *lpmat2 )
|
BOOL ignore_rotation )
|
||||||
{
|
|
||||||
if (!lpmat2) return GDI_ERROR;
|
|
||||||
|
|
||||||
if(!(fuFormat & GGO_GLYPH_INDEX)) {
|
|
||||||
UINT cp;
|
|
||||||
int len;
|
|
||||||
char mbchs[2];
|
|
||||||
WCHAR wChar;
|
|
||||||
|
|
||||||
cp = GdiGetCodePage(hdc);
|
|
||||||
if (IsDBCSLeadByteEx(cp, uChar >> 8)) {
|
|
||||||
len = 2;
|
|
||||||
mbchs[0] = (uChar & 0xff00) >> 8;
|
|
||||||
mbchs[1] = (uChar & 0xff);
|
|
||||||
} else {
|
|
||||||
len = 1;
|
|
||||||
mbchs[0] = (uChar & 0xff);
|
|
||||||
}
|
|
||||||
wChar = 0;
|
|
||||||
MultiByteToWideChar(cp, 0, mbchs, len, &wChar, 1);
|
|
||||||
uChar = wChar;
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetGlyphOutlineW(hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer,
|
|
||||||
lpmat2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GetGlyphOutlineW (GDI32.@)
|
|
||||||
*/
|
|
||||||
DWORD WINAPI GetGlyphOutlineW( HDC hdc, UINT uChar, UINT fuFormat,
|
|
||||||
LPGLYPHMETRICS lpgm, DWORD cbBuffer,
|
|
||||||
LPVOID lpBuffer, const MAT2 *lpmat2 )
|
|
||||||
{
|
{
|
||||||
DC *dc;
|
DC *dc;
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
PHYSDEV dev;
|
PHYSDEV dev;
|
||||||
|
|
||||||
TRACE("(%p, %04x, %04x, %p, %d, %p, %p)\n",
|
TRACE( "(%p, %04x, %04x, %p, %d, %p, %p)\n", hdc, ch, format, metrics, size, buffer, mat2 );
|
||||||
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
|
|
||||||
|
|
||||||
if (!lpmat2) return GDI_ERROR;
|
if (!mat2) return GDI_ERROR;
|
||||||
|
|
||||||
dc = get_dc_ptr(hdc);
|
dc = get_dc_ptr(hdc);
|
||||||
if(!dc) return GDI_ERROR;
|
if(!dc) return GDI_ERROR;
|
||||||
|
|
||||||
uChar &= 0xffff;
|
|
||||||
|
|
||||||
dev = GET_DC_PHYSDEV( dc, pGetGlyphOutline );
|
dev = GET_DC_PHYSDEV( dc, pGetGlyphOutline );
|
||||||
ret = dev->funcs->pGetGlyphOutline( dev, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
|
ret = dev->funcs->pGetGlyphOutline( dev, ch & 0xffff, format, metrics, size, buffer, mat2 );
|
||||||
release_dc_ptr( dc );
|
release_dc_ptr( dc );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1742,3 +1742,47 @@ BOOL WINAPI GetCharABCWidthsI( HDC hdc, UINT first, UINT count, WORD *glyphs, AB
|
||||||
NTGDI_GETCHARABCWIDTHS_INDICES | NTGDI_GETCHARABCWIDTHS_INT,
|
NTGDI_GETCHARABCWIDTHS_INDICES | NTGDI_GETCHARABCWIDTHS_INT,
|
||||||
buffer );
|
buffer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetGlyphOutlineA (GDI32.@)
|
||||||
|
*/
|
||||||
|
DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *metrics, DWORD size,
|
||||||
|
void *buffer, const MAT2 *mat2 )
|
||||||
|
{
|
||||||
|
if (!mat2) return GDI_ERROR;
|
||||||
|
|
||||||
|
if (!(format & GGO_GLYPH_INDEX))
|
||||||
|
{
|
||||||
|
UINT cp;
|
||||||
|
int len;
|
||||||
|
char mbchs[2];
|
||||||
|
WCHAR wChar;
|
||||||
|
|
||||||
|
cp = GdiGetCodePage( hdc );
|
||||||
|
if (IsDBCSLeadByteEx( cp, ch >> 8 ))
|
||||||
|
{
|
||||||
|
len = 2;
|
||||||
|
mbchs[0] = (ch & 0xff00) >> 8;
|
||||||
|
mbchs[1] = (ch & 0xff);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
len = 1;
|
||||||
|
mbchs[0] = ch & 0xff;
|
||||||
|
}
|
||||||
|
wChar = 0;
|
||||||
|
MultiByteToWideChar(cp, 0, mbchs, len, &wChar, 1 );
|
||||||
|
ch = wChar;
|
||||||
|
}
|
||||||
|
|
||||||
|
return GetGlyphOutlineW( hdc, ch, format, metrics, size, buffer, mat2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetGlyphOutlineW (GDI32.@)
|
||||||
|
*/
|
||||||
|
DWORD WINAPI GetGlyphOutlineW( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *metrics,
|
||||||
|
DWORD size, void *buffer, const MAT2 *mat2 )
|
||||||
|
{
|
||||||
|
return NtGdiGetGlyphOutlineW( hdc, ch, format, metrics, size, buffer, mat2, FALSE );
|
||||||
|
}
|
||||||
|
|
|
@ -240,6 +240,9 @@ BOOL WINAPI NtGdiGetDCDword( HDC hdc, UINT method, DWORD *result );
|
||||||
BOOL WINAPI NtGdiGetDCPoint( HDC hdc, UINT method, POINT *result );
|
BOOL WINAPI NtGdiGetDCPoint( HDC hdc, UINT method, POINT *result );
|
||||||
INT WINAPI NtGdiGetDeviceCaps( HDC hdc, INT cap );
|
INT WINAPI NtGdiGetDeviceCaps( HDC hdc, INT cap );
|
||||||
BOOL WINAPI NtGdiGetDeviceGammaRamp( HDC hdc, void *ptr );
|
BOOL WINAPI NtGdiGetDeviceGammaRamp( HDC hdc, void *ptr );
|
||||||
|
DWORD WINAPI NtGdiGetGlyphOutlineW( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *metrics,
|
||||||
|
DWORD size, void *buffer, const MAT2 *mat2,
|
||||||
|
BOOL ignore_rotation );
|
||||||
BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *rect,
|
BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *rect,
|
||||||
const WCHAR *str, UINT count, const INT *dx, DWORD cp );
|
const WCHAR *str, UINT count, const INT *dx, DWORD cp );
|
||||||
BOOL WINAPI NtGdiGetMiterLimit( HDC hdc, FLOAT *limit );
|
BOOL WINAPI NtGdiGetMiterLimit( HDC hdc, FLOAT *limit );
|
||||||
|
|
Loading…
Reference in a new issue