29 #include YFM_YSLib_UI_YBrush
30 #include YFM_YSLib_Service_YDraw
31 #include YFM_YSLib_Service_YPixel // for Drawing::Shaders::BlitAlphaPoint;
36 using namespace Drawing;
51 YAssert(
bool(Update),
"Null updater found.");
53 Update(e, *ImagePtr, DstOffset, SrcOffset);
58 const Point& dst_offset,
const Point& src_offset)
60 const auto&
g(pc.Target);
61 const Rect&
r(pc.ClipArea);
62 const auto& src(img.GetContext());
67 src.GetBufferPtr(),
g.GetSize(), src.GetSize(), r.GetPoint(),
68 r.GetPoint() + src_offset - dst_offset, r.GetSize());
73 const Point& dst_offset,
const Point& src_offset)
static void DefaultUpdate(const PaintContext &, const Drawing::Image &, const Point &, const Point &)
默认更新:复制图像。
YF_API void FillRect(const Graphics &g, const Rect &, Color c)
填充标准矩形。
void operator()(PaintEventArgs &&)
void UpdatePixels(_fPixelShader shader, const PaintContext &pc, const Drawing::Image &img, const Point &dst_offset, const Point &src_offset)
更新:逐像素操作。
#define YAssert(_expr, _msg)
static void UpdateComposite(const PaintContext &, const Drawing::Image &, const Point &, const Point &)
更新:Alpha 组合图像。