Implement InvertRect on Mac. r sfraser

This commit is contained in:
brade%netscape.com 1999-07-20 23:38:55 +00:00
Родитель e61205fb16
Коммит 0621f4050e
3 изменённых файлов: 20 добавлений и 4 удалений

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

@ -1397,10 +1397,26 @@ NS_IMETHODIMP nsRenderingContextMac::RetrieveCurrentNativeGraphicData(PRUint32 *
NS_IMETHODIMP nsRenderingContextMac::InvertRect(const nsRect& aRect)
{
return NS_OK;
return InvertRect(aRect.x, aRect.y, aRect.width, aRect.height);
}
NS_IMETHODIMP nsRenderingContextMac::InvertRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight)
{
return NS_OK;
StartDraw();
nscoord x,y,w,h;
Rect therect;
x = aX;
y = aY;
w = aWidth;
h = aHeight;
mGS->mTMatrix.TransformCoord(&x, &y, &w, &h);
::SetRect(&therect, pinToShort(x), pinToShort(y), pinToShort(x + w), pinToShort(y + h));
::InvertRect(&therect);
EndDraw();
return NS_OK;
}

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

@ -871,7 +871,7 @@ nsTextFrame::PaintTextDecorations(nsIRenderingContext& aRenderingContext,
//
// For platforms that dont implement InvertRect(), the selection will be
// a non-filled rectangle.
#if defined(XP_PC) || defined(XP_UNIX)
#if defined(XP_PC) || defined(XP_UNIX) || defined(XP_MAC)
aRenderingContext.SetColor(NS_RGB(255,255,255));
aRenderingContext.InvertRect(aX + startOffset, aY, textWidth, rect.height);
#else

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

@ -871,7 +871,7 @@ nsTextFrame::PaintTextDecorations(nsIRenderingContext& aRenderingContext,
//
// For platforms that dont implement InvertRect(), the selection will be
// a non-filled rectangle.
#if defined(XP_PC) || defined(XP_UNIX)
#if defined(XP_PC) || defined(XP_UNIX) || defined(XP_MAC)
aRenderingContext.SetColor(NS_RGB(255,255,255));
aRenderingContext.InvertRect(aX + startOffset, aY, textWidth, rect.height);
#else