r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - Code from Javier - don't hardcode pixels to twips,
and don't draw 0 height or width rectangles
This commit is contained in:
mkaply%us.ibm.com 2001-08-30 03:22:24 +00:00
Родитель 94050ac3cb
Коммит 0bf52e8a27
2 изменённых файлов: 6 добавлений и 11 удалений

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

@ -118,15 +118,6 @@ nsresult nsDeviceContextOS2::Init( nsNativeWidget aWidget)
CommonInit(::WinOpenWindowDC((HWND)aWidget));
// It would seem that Mozilla basically requires that mTwipsToPixels = 1/15 and
// mPixelsToTwips = 15. Some side effects from not doing this are boxes drawing
// wrong and fonts coming out incorrect. We only want to do this for screen,
// not printing.
mTwipsToPixels = 1.0f / 15.0f;
mPixelsToTwips = 1.0f / mTwipsToPixels;
return retval;
}

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

@ -1092,8 +1092,12 @@ void nsRenderingContextOS2::PMDrawRect( nsRect &rect, BOOL fill)
if (rcl.xLeft == rcl.xRight || rcl.yTop == rcl.yBottom)
{
SetupLineColorAndStyle ();
GFX (::GpiLine (mPS, ((PPOINTL)&rcl) + 1), GPI_ERROR);
// only draw line if it has a non-zero height and width
if( rect.width && rect.height )
{
SetupLineColorAndStyle ();
GFX (::GpiLine (mPS, ((PPOINTL)&rcl) + 1), GPI_ERROR);
}
}
else
{