mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 10:02:02 +00:00
[NTGDI] Fix PatBlt with negative values (#6038)
When I am implementing the IME soft keyboard (#6021 and #6036), I noticed an issue with PatBlt function. - Fix the rectangle coordinates when the value was negative in NtGdiPatBlt function. - Fix NC_DrawFrame function. - Fix UserDrawWindowFrame function. CORE-19334
This commit is contained in:
parent
90e17817fe
commit
0bfa0cd0d2
2 changed files with 12 additions and 12 deletions
|
@ -858,26 +858,26 @@ IntPatBlt(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (Width > 0)
|
||||
if (Width >= 0)
|
||||
{
|
||||
DestRect.left = XLeft;
|
||||
DestRect.right = XLeft + Width;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestRect.left = XLeft + Width + 1;
|
||||
DestRect.right = XLeft + 1;
|
||||
DestRect.left = XLeft + Width;
|
||||
DestRect.right = XLeft;
|
||||
}
|
||||
|
||||
if (Height > 0)
|
||||
if (Height >= 0)
|
||||
{
|
||||
DestRect.top = YLeft;
|
||||
DestRect.bottom = YLeft + Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestRect.top = YLeft + Height + 1;
|
||||
DestRect.bottom = YLeft + 1;
|
||||
DestRect.top = YLeft + Height;
|
||||
DestRect.bottom = YLeft;
|
||||
}
|
||||
|
||||
IntLPtoDP(pdc, (LPPOINT)&DestRect, 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue