Skip to content

Commit

Permalink
Merge pull request duilib#171 from T6Zksor/master
Browse files Browse the repository at this point in the history
修复 CContainerUI::DoPaint 绘制区域超出指定范围
  • Loading branch information
daviyang35 authored Sep 12, 2018
2 parents 2af63c7 + 8d551ab commit eafa681
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions DuiLib/Core/UIRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ void CRenderClip::GenerateClip(HDC hDC, RECT rc, CRenderClip& clip)
::GetClipBox(hDC, &rcClip);
clip.hOldRgn = ::CreateRectRgnIndirect(&rcClip);
clip.hRgn = ::CreateRectRgnIndirect(&rc);
::ExtSelectClipRgn(hDC, clip.hRgn, RGN_AND);
::CombineRgn(clip.hRgn, clip.hRgn, clip.hOldRgn, RGN_AND);
::SelectClipRgn(hDC, clip.hRgn);
clip.hDC = hDC;
clip.rcItem = rc;
}
Expand All @@ -87,7 +88,8 @@ void CRenderClip::GenerateRoundClip(HDC hDC, RECT rc, RECT rcItem, int width, in
clip.hRgn = ::CreateRectRgnIndirect(&rc);
HRGN hRgnItem = ::CreateRoundRectRgn(rcItem.left, rcItem.top, rcItem.right + 1, rcItem.bottom + 1, width, height);
::CombineRgn(clip.hRgn, clip.hRgn, hRgnItem, RGN_AND);
::ExtSelectClipRgn(hDC, clip.hRgn, RGN_AND);
::CombineRgn(clip.hRgn, clip.hRgn, clip.hOldRgn, RGN_AND);
::SelectClipRgn(hDC, clip.hRgn);
clip.hDC = hDC;
clip.rcItem = rc;
::DeleteObject(hRgnItem);
Expand Down

0 comments on commit eafa681

Please sign in to comment.