bool CopyTo(BitmapPtr dst, const Graphics& g, const Size& ds, const Point& dp, const Point& sp, const Size& sc, Rotation rot) { if(~rot & 1 && dst && bool(g)) { if(rot == RDeg0) BlitLines<false, false>(CopyLine<true>(), dst, g.GetBufferPtr(), ds, g.GetSize(), dp, sp, sc); else BlitLines<true, true>(CopyLine<false>(), dst, g.GetBufferPtr(), ds, g.GetSize(), dp, sp, sc); return true; } return false; }
void CopyBuffer(const Graphics& dst, const Graphics& src) { YAssert(dst.GetBufferPtr(), "Null pointer found."); YAssert(src.GetBufferPtr(), "Null pointer found."); YAssert(dst.GetSize() == src.GetSize(), "Source and destination sizes" "are not same."); if(YB_LIKELY(dst.GetBufferPtr() != src.GetBufferPtr())) std::copy_n(src.GetBufferPtr(), GetAreaOf(src.GetSize()), dst.GetBufferPtr()); }
void Fill(const Graphics& g, Color c) { FillPixel<PixelType>(g.GetBufferPtr(), GetAreaOf(g.GetSize()), c); }
void ClearImage(const Graphics& g) { ClearPixel(g.GetBufferPtr(), GetAreaOf(g.GetSize())); }