зеркало из https://github.com/mozilla/pjs.git
Rect drawing wxh were off by one.
This commit is contained in:
Родитель
e93a9f9d7c
Коммит
f1a62e6eff
|
@ -779,10 +779,18 @@ nsRenderingContextXlib::DrawRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord
|
|||
|
||||
mTMatrix->TransformCoord(&x,&y,&w,&h);
|
||||
|
||||
::XDrawRectangle(mDisplay,
|
||||
mRenderingSurface->GetDrawable(),
|
||||
mRenderingSurface->GetGC(),
|
||||
x,y,w,h);
|
||||
// Don't draw empty rectangles; also, w/h are adjusted down by one
|
||||
// so that the right number of pixels are drawn.
|
||||
if (w && h)
|
||||
{
|
||||
::XDrawRectangle(mDisplay,
|
||||
mRenderingSurface->GetDrawable(),
|
||||
mRenderingSurface->GetGC(),
|
||||
x,
|
||||
y,
|
||||
w - 1,
|
||||
h - 1);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче