mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Rect drawing wxh were off by one.
This commit is contained in:
parent
6d4424c765
commit
10b1f3c22c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user