Files
TTDownloader/third_party/NIM_Duilib_Framework/duilib/Render/Brush.cpp
T
tongtong e1e26acc49 第三方框架改为仓内子集并完善构建忽略规则
完整 NIM_Duilib_Framework 仓库移至父目录,third_party 仅保留实际使用的 base、duilib、bin/resources 与许可证;.gitignore 覆盖 MSBuild 与打包产物。
2026-11-15 08:54:17 +08:00

36 lines
604 B
C++

#include "StdAfx.h"
namespace ui {
using namespace Gdiplus;
Brush_Gdiplus::Brush_Gdiplus(DWORD color)
: IBrush(color)
{
brush_.reset(new SolidBrush(color));
}
Brush_Gdiplus::Brush_Gdiplus(HBITMAP bitmap)
: IBrush(bitmap)
{
Gdiplus::Bitmap image(bitmap, NULL);
bitmap_brush_.reset(new TextureBrush(&image));
}
Brush_Gdiplus::Brush_Gdiplus(const Brush_Gdiplus& r)
: IBrush(r)
{
if (r.brush_)
brush_.reset(r.brush_->Clone());
if (r.bitmap_brush_)
bitmap_brush_.reset(r.bitmap_brush_->Clone());
}
ui::IBrush* Brush_Gdiplus::Clone()
{
return new Brush_Gdiplus(*this);
}
} // namespace ui