30 using namespace ystdex;
43 return max<int>(0, -d);
49 return min<int>(min<int>(dl - d, sl - s), cl);
56 const Size& ds,
const Size& ss,
const Size& sc,
57 int& min_x,
int& min_y,
int& delta_x,
int& delta_y)
60 delta_x =
blit_max(sp.X, dp.X, ss.Width, ds.Width, sc.Width),
61 delta_y =
blit_max(sp.Y, dp.Y, ss.Height, ds.Height, sc.Height));
62 if(min_x < delta_x && min_y < delta_y)
64 yunseq(delta_x -= min_x, delta_y -= min_y);
74 return max<int>(0, dp.Y) * ds.Width + max<int>(0, dp.X);
80 return (max<int>(0, dp.Y) + delta_y - 1) * ds.Width + max<int>(0, dp.X);
86 return max<int>(0, dp.Y) * ds.Width + max<int>(0, dp.X) + delta_x - 1;
92 return (max<int>(0, dp.Y) + delta_y - 1) * ds.Width
93 + max<int>(0, dp.X) + delta_x - 1;
126 YAssert(dst.GetBufferPtr(),
"Null pointer found.");
127 YAssert(src.GetBufferPtr(),
"Null pointer found.");
128 YAssert(dst.GetSize() == src.GetSize(),
"Source and destination sizes"
131 if(
YB_LIKELY(dst.GetBufferPtr() != src.GetBufferPtr()))
132 std::copy_n(src.GetBufferPtr(),
GetAreaOf(src.GetSize()),
145 FillPixel<PixelType>(g.GetBufferPtr(),
GetAreaOf(g.GetSize()), c);