mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.Draw: CreateImage variant with RGBA
git-svn-id: svn://ultimatepp.org/upp/trunk@2578 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
79dd152b45
commit
c8a8fdcc21
3 changed files with 8 additions and 4 deletions
|
|
@ -1272,7 +1272,6 @@ bool ArrayCtrl::SetCursor(int i)
|
|||
return SetCursor0(i);
|
||||
}
|
||||
|
||||
|
||||
void ArrayCtrl::ShowAppendLine() {
|
||||
sb.ScrollInto(GetTotalCy(), GetLineCy());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
Image CreateImage(Size sz, const RGBA& rgba);
|
||||
Image CreateImage(Size sz, Color color);
|
||||
Image SetColorKeepAlpha(const Image& img, Color c);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue