Commit 52c3a456 authored by gambas's avatar gambas
Browse files

Picture.Copy() keeps alpha component as expected.

[GB.QT4]
* BUG: Picture.Copy() keeps alpha component as expected.

[GB.QT5]
* BUG: Picture.Copy() keeps alpha component as expected.
parent b84e85b5
Pipeline #442701631 failed with stage
in 60 minutes and 2 seconds
......@@ -315,13 +315,8 @@ BEGIN_METHOD(Picture_Copy, GB_INTEGER x; GB_INTEGER y; GB_INTEGER w; GB_INTEGER
int h = VARGOPT(h, THIS->pixmap->height());
pict = create();
delete pict->pixmap;
pict->pixmap = new QPixmap(w, h);
*pict->pixmap = THIS->pixmap->copy(x, y, w, h);
QPainter p(pict->pixmap);
p.drawPixmap(0, 0, *THIS->pixmap, x, y, w, h);
p.end();
GB.ReturnObject(pict);
END_METHOD
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment