mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 01:03:41 +00:00
[GDI32] GdiDrawStream: Improve handling of small rcDest sizes
- Abort drawing if rcDest has negative height or width. - Ignore sizing margins if rcDest is too small. CORE-13513
This commit is contained in:
parent
b4d691ba96
commit
febf9acfee
1 changed files with 13 additions and 0 deletions
|
@ -677,6 +677,19 @@ GdiDrawStream(HDC dc, ULONG l, PGDI_DRAW_STREAM pDS)
|
||||||
else
|
else
|
||||||
sizingtype = ST_STRETCH;
|
sizingtype = ST_STRETCH;
|
||||||
|
|
||||||
|
if (pDS->rcDest.right < pDS->rcDest.left || pDS->rcDest.bottom < pDS->rcDest.top)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (sm.cxLeftWidth + sm.cxRightWidth > pDS->rcDest.right - pDS->rcDest.left)
|
||||||
|
{
|
||||||
|
sm.cxLeftWidth = sm.cxRightWidth = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sm.cyTopHeight + sm.cyBottomHeight > pDS->rcDest.bottom - pDS->rcDest.top)
|
||||||
|
{
|
||||||
|
sm.cyTopHeight = sm.cyBottomHeight = 0;
|
||||||
|
}
|
||||||
|
|
||||||
UXTHEME_DrawImageBackground(pDS->hDC,
|
UXTHEME_DrawImageBackground(pDS->hDC,
|
||||||
pDS->hImage,
|
pDS->hImage,
|
||||||
&pDS->rcSrc,
|
&pDS->rcSrc,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue