DC_AllocDc:

- Set DC's iGraphicsMode to GM_COMPATIBLE when creating a DC
NtGdiRectangle:
- only exclude bottom/right pixels if dc is GM_COMPATIBLE
- fix indentation

svn path=/trunk/; revision=34553
This commit is contained in:
Timo Kreuzer 2008-07-16 19:48:19 +00:00
parent 4a5e93fab1
commit a8f3f89717
2 changed files with 78 additions and 73 deletions

View file

@ -2485,6 +2485,7 @@ DC_AllocDC(PUNICODE_STRING Driver)
Dc_Attr->ulDirty_ = 0; // Server side Dc_Attr->ulDirty_ = 0; // Server side
Dc_Attr->iMapMode = MM_TEXT; Dc_Attr->iMapMode = MM_TEXT;
Dc_Attr->iGraphicsMode = GM_COMPATIBLE;
Dc_Attr->szlWindowExt.cx = 1; // Float to Int,,, WRONG! Dc_Attr->szlWindowExt.cx = 1; // Float to Int,,, WRONG!
Dc_Attr->szlWindowExt.cy = 1; Dc_Attr->szlWindowExt.cy = 1;

View file

@ -556,7 +556,6 @@ IntRectangle(PDC dc,
return PATH_Rectangle ( dc, LeftRect, TopRect, RightRect, BottomRect ); return PATH_Rectangle ( dc, LeftRect, TopRect, RightRect, BottomRect );
} }
{
DestRect.left = LeftRect; DestRect.left = LeftRect;
DestRect.right = RightRect; DestRect.right = RightRect;
DestRect.top = TopRect; DestRect.top = TopRect;
@ -565,9 +564,16 @@ IntRectangle(PDC dc,
IntLPtoDP(dc, (LPPOINT)&DestRect, 2); IntLPtoDP(dc, (LPPOINT)&DestRect, 2);
DestRect.left += dc->ptlDCOrig.x; DestRect.left += dc->ptlDCOrig.x;
DestRect.right += dc->ptlDCOrig.x - 1; DestRect.right += dc->ptlDCOrig.x;
DestRect.top += dc->ptlDCOrig.y; DestRect.top += dc->ptlDCOrig.y;
DestRect.bottom += dc->ptlDCOrig.y - 1; DestRect.bottom += dc->ptlDCOrig.y;
/* In GM_COMPATIBLE, don't include bottom and right edges */
if (IntGetGraphicsMode(dc) == GM_COMPATIBLE)
{
DestRect.right--;
DestRect.bottom--;
}
/* Special locking order to avoid lock-ups! */ /* Special locking order to avoid lock-ups! */
FillBrushObj = BRUSHOBJ_LockBrush(Dc_Attr->hbrush); FillBrushObj = BRUSHOBJ_LockBrush(Dc_Attr->hbrush);
@ -641,8 +647,6 @@ IntRectangle(PDC dc,
Mix); Mix);
} }
}
cleanup: cleanup:
if (FillBrushObj) if (FillBrushObj)
BRUSHOBJ_UnlockBrush(FillBrushObj); BRUSHOBJ_UnlockBrush(FillBrushObj);