.Draw: CreateImage variant with RGBA

git-svn-id: svn://ultimatepp.org/upp/trunk@2578 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-07-29 13:37:31 +00:00
parent 79dd152b45
commit c8a8fdcc21
3 changed files with 8 additions and 4 deletions

View file

@ -19,14 +19,18 @@ Image WithHotSpot(const Image& m, int x1, int y1)
return b;
}
Image CreateImage(Size sz, Color color)
Image CreateImage(Size sz, const RGBA& rgba)
{
ImageBuffer ib(sz);
RGBA rgba = color;
memsetex(ib, &rgba, sizeof(RGBA), ib.GetLength());
Fill(~ib, rgba, ib.GetLength());
return ib;
}
Image CreateImage(Size sz, Color color)
{
return CreateImage(sz, (RGBA)color);
}
Size DstSrc(ImageBuffer& dest, Point& p, const Image& src, Rect& sr)
{
if(p.x < 0) {