ide: designer issue #613

git-svn-id: svn://ultimatepp.org/upp/trunk@6765 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-01-13 08:30:54 +00:00
parent 950917f031
commit 67cbfd68ee
3 changed files with 7 additions and 5 deletions

View file

@ -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));
}