changed overline code to use font metrics

This commit is contained in:
peterl%netscape.com 1998-09-17 00:15:56 +00:00
Родитель 16322ead39
Коммит 09156dd508
1 изменённых файлов: 14 добавлений и 4 удалений

Просмотреть файл

@ -1151,8 +1151,13 @@ void nsRenderingContextWin :: DrawString(const char *aString, PRUint32 aLength,
mTMatrix->TransformCoord(&x,&y); mTMatrix->TransformCoord(&x,&y);
::ExtTextOut(mDC,x,y,0,NULL,aString,aLength,NULL); ::ExtTextOut(mDC,x,y,0,NULL,aString,aLength,NULL);
if (GetFont().decorations & NS_FONT_DECORATION_OVERLINE) PRUint8 decorations = GetFont().decorations;
DrawLine(aX, aY, aX + aWidth, aY); if (decorations & NS_FONT_DECORATION_OVERLINE) {
nscoord offset;
nscoord size;
mFontMetrics->GetUnderline(offset, size);
FillRect(aX, aY, aWidth, size);
}
} }
void nsRenderingContextWin :: DrawString(const PRUnichar *aString, PRUint32 aLength, void nsRenderingContextWin :: DrawString(const PRUnichar *aString, PRUint32 aLength,
@ -1165,8 +1170,13 @@ void nsRenderingContextWin :: DrawString(const PRUnichar *aString, PRUint32 aLen
mTMatrix->TransformCoord(&x,&y); mTMatrix->TransformCoord(&x,&y);
::ExtTextOutW(mDC,x,y,0,NULL,aString,aLength,NULL); ::ExtTextOutW(mDC,x,y,0,NULL,aString,aLength,NULL);
if (GetFont().decorations & NS_FONT_DECORATION_OVERLINE) PRUint8 decorations = GetFont().decorations;
DrawLine(aX, aY, aX + aWidth, aY); if (decorations & NS_FONT_DECORATION_OVERLINE) {
nscoord offset;
nscoord size;
mFontMetrics->GetUnderline(offset, size);
FillRect(aX, aY, aWidth, size);
}
} }
void nsRenderingContextWin :: DrawString(const nsString& aString, void nsRenderingContextWin :: DrawString(const nsString& aString,