mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-24 06:12:52 -06:00
ide: designer issue #613
git-svn-id: svn://ultimatepp.org/upp/trunk@6765 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
950917f031
commit
67cbfd68ee
3 changed files with 7 additions and 5 deletions
|
|
@ -33,10 +33,10 @@ SImageDraw::operator Image() const
|
|||
{
|
||||
ImageBuffer b(ib.GetSize());
|
||||
memcpy(b, ib.Begin(), sizeof(RGBA) * ib.GetLength());
|
||||
const RGBA *s = alpha.ib.Begin();
|
||||
RGBA *t = b;
|
||||
const RGBA *e = b.End();;
|
||||
if(has_alpha) {
|
||||
const RGBA *s = alpha.ib.Begin();
|
||||
while(t < e) {
|
||||
t->a = s->r;
|
||||
t++;
|
||||
|
|
@ -57,11 +57,13 @@ SImageDraw::operator Image() const
|
|||
|
||||
SImageDraw::SImageDraw(Size sz)
|
||||
{
|
||||
has_alpha = false;
|
||||
SImageDraw1::Create(sz);
|
||||
}
|
||||
|
||||
SImageDraw::SImageDraw(int cx, int cy)
|
||||
{
|
||||
has_alpha = false;
|
||||
SImageDraw1::Create(Size(cx, cy));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue