From bf894a5f1ec3cb6fe90e4828704c68b04440a76b Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Tue, 14 Nov 2000 21:27:11 +0000 Subject: [PATCH] #56853 r=mkaply, a=blizzard Code from aaron reed to fix polygon drawing. Also 16 color fix from jkobal. --- gfx/src/os2/nsRenderingContextOS2.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gfx/src/os2/nsRenderingContextOS2.cpp b/gfx/src/os2/nsRenderingContextOS2.cpp index 3a6a28bfa94..d774729d949 100644 --- a/gfx/src/os2/nsRenderingContextOS2.cpp +++ b/gfx/src/os2/nsRenderingContextOS2.cpp @@ -356,13 +356,15 @@ nsresult nsRenderingContextOS2::SelectOffScreenDrawingSurface( nsDrawingSurface ::GpiSelectPalette(mSurface->mPS, (HPAL)palInfo.palette); ::WinRealizePalette((HWND)mDCOwner->GetNativeData(NS_NATIVE_WINDOW),mSurface->mPS, &cclr); } else if (!palInfo.isPaletteDevice && palInfo.palette) { - GpiCreateLogColorTable( mSurface->mPS, LCOL_RESET | LCOL_PURECOLOR, +// GpiCreateLogColorTable( mSurface->mPS, LCOL_RESET | LCOL_PURECOLOR, + GpiCreateLogColorTable( mSurface->mPS, LCOL_RESET, LCOLF_CONSECRGB, 0, palInfo.sizePalette, (PLONG) palInfo.palette); } else { - GpiCreateLogColorTable( mSurface->mPS, LCOL_PURECOLOR, +// GpiCreateLogColorTable( mSurface->mPS, LCOL_PURECOLOR, + GpiCreateLogColorTable( mSurface->mPS, 0, LCOLF_RGB, 0, 0, 0); } } @@ -1026,8 +1028,11 @@ void nsRenderingContextOS2::PMDrawPoly( const nsPoint aPoints[], PRInt32 aNumPoi if( bFilled == PR_TRUE) { POLYGON pgon = { aNumPoints - 1, pts + 1 }; + //IBM-AKR changed from boundary and inclusive to be noboundary and + // exclusive to fix bug with text fields, buttons, etc. borders + // being 1 pel too thick. Bug 56853 GpiPolygons( mSurface->mPS, 1, &pgon, - POLYGON_BOUNDARY, POLYGON_INCL); + POLYGON_NOBOUNDARY, POLYGON_EXCL); } else { @@ -1618,3 +1623,4 @@ NS_IMETHODIMP nsRenderingContextOS2::ConditionRect(nscoord &x, nscoord &y, nscoo return NS_OK; } +