Draw: New Copy(Image, Rect) variant

git-svn-id: svn://ultimatepp.org/upp/trunk@11894 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-04-16 12:34:10 +00:00
parent 64dbf66224
commit ecf64bd572
3 changed files with 16 additions and 1 deletions

View file

@ -75,6 +75,13 @@ Image GetOver(const Image& dest, const Image& src)
return r;
}
Image Copy(const Image& src, const Rect& srect)
{
ImageBuffer ib(srect.GetSize());
Copy(ib, Point(0, 0), src, srect);
return ib;
}
void Fill(ImageBuffer& dest, const Rect& rect, RGBA color)
{
Rect r = dest.GetSize() & rect;