gdi: Fix GetTextExentExPointW to return values consistent with GetTextExtentPointW.

This commit is contained in:
Troy Rollo 2006-05-02 13:49:22 +10:00 committed by Alexandre Julliard
parent 4bb446f8a8
commit 73c7420c5a
1 changed files with 2 additions and 3 deletions

View File

@ -1239,12 +1239,12 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count,
size->cx = size->cy = nFit = extent = 0;
for(index = 0; index < count; index++)
{
if(!GetTextExtentPoint32W( hdc, str, 1, &tSize )) goto done;
if(!GetTextExtentPoint32W( hdc, str, index + 1, &tSize )) goto done;
/* GetTextExtentPoint includes intercharacter spacing. */
/* FIXME - justification needs doing yet. Remember that the base
* data will not be in logical coordinates.
*/
extent += tSize.cx;
extent = tSize.cx;
if( !lpnFit || extent <= maxExt )
/* It is allowed to be equal. */
{
@ -1252,7 +1252,6 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count,
if( alpDx ) alpDx[index] = extent;
}
if( tSize.cy > size->cy ) size->cy = tSize.cy;
str++;
}
size->cx = extent;
if(lpnFit) *lpnFit = nFit;