29 #include YFM_YSLib_Service_YBlit
31 using namespace ystdex;
46 return max<SPos>(max<SPos>(0,
s), s - d);
52 return min<SPos>(min<SPos>(sl, s + cl), s + dl - d);
64 yunseq(min_x = blit_min(sp.
X, dp.
X), min_y = blit_min(sp.
Y, dp.
Y),
67 if(min_x < max_x && min_y < max_y)
69 yunseq(delta_x = max_x - min_x, delta_y = max_y - min_y);
80 YAssert(dst.GetSize() == src.GetSize(),
"Source and destination sizes"
83 if(
YB_LIKELY(dst.GetBufferPtr() != src.GetBufferPtr()))
84 std::copy_n(src.GetBufferPtr(),
GetAreaOf(src.GetSize()),
97 FillPixel<PixelType>(g.GetBufferPtr(),
GetAreaOf(g.GetSize()), c);
_tOut ClearPixel(_tOut dst, size_t n) ynothrow
清除指定位置的 n 个连续像素。
YF_API void ClearImage(const Graphics &)
清除图形接口上下文缓冲区。
yconstfn auto GetAreaOf(const Size &s) ynothrow-> decltype(s.Width *s.Height)
取面积。
std::uint16_t SDst
屏幕坐标距离。
YF_API bool BlitBounds(const Point &, const Point &, const Size &, const Size &, const Size &, SDst &, SDst &, SDst &, SDst &)
贴图边界计算器。
#define yunseq
无序列依赖表达式组求值。
#define YAssertNonnull(_expr)
YF_API void Fill(const Graphics &, Color)
使用指定颜色填充图形接口上下文缓冲区。
YF_API void CopyBuffer(const Graphics &, const Graphics &)
以第一个参数作为目标,复制第二个参数的缓冲区内容。
#define YAssert(_expr, _msg)