第三方框架改为仓内子集并完善构建忽略规则
完整 NIM_Duilib_Framework 仓库移至父目录,third_party 仅保留实际使用的 base、duilib、bin/resources 与许可证;.gitignore 覆盖 MSBuild 与打包产物。
This commit is contained in:
1 parent
249e8548de
commit
e1e26acc49
391 files changed
+342850
No files matched your search
@@ -0,0 +1,51 @@
|
||||
#include "StdAfx.h"
|
||||
|
||||
namespace ui {
|
||||
|
||||
GdiClip::GdiClip()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
GdiClip::~GdiClip()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GdiClip::CreateClip(HDC hDC, UiRect rcItem)
|
||||
{
|
||||
if (hDC != NULL) {
|
||||
CPoint ptWinOrg;
|
||||
GetWindowOrgEx(hDC, &ptWinOrg);
|
||||
rcItem.Offset(-ptWinOrg.x, -ptWinOrg.y);
|
||||
|
||||
HRGN hRgn = ::CreateRectRgnIndirect(&rcItem);
|
||||
::SaveDC(hDC);
|
||||
::ExtSelectClipRgn(hDC, hRgn, RGN_AND);
|
||||
::DeleteObject(hRgn);
|
||||
}
|
||||
}
|
||||
|
||||
void GdiClip::CreateRoundClip(HDC hDC, UiRect rcItem, int width, int height)
|
||||
{
|
||||
if (hDC != NULL) {
|
||||
CPoint ptWinOrg;
|
||||
GetWindowOrgEx(hDC, &ptWinOrg);
|
||||
rcItem.Offset(-ptWinOrg.x, -ptWinOrg.y);
|
||||
|
||||
HRGN hRgn = ::CreateRoundRectRgn(rcItem.left, rcItem.top, rcItem.right + 1, rcItem.bottom + 1, width, height);
|
||||
::SaveDC(hDC);
|
||||
::ExtSelectClipRgn(hDC, hRgn, RGN_AND);
|
||||
::DeleteObject(hRgn);
|
||||
}
|
||||
}
|
||||
|
||||
void GdiClip::ClearClip(HDC hDC)
|
||||
{
|
||||
if (hDC != NULL) {
|
||||
ASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);
|
||||
::RestoreDC(hDC, -1);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
Reference in new issue
Block a user