fix resize bug

This commit is contained in:
Geoffray Levasseur committed 2026-11-04 15:06:43 +01:00
1 parent e5f109327c
commit 988acdbab8
2 files changed
+6

No files matched your search

+3
View File
@@ -339,7 +339,10 @@ void glowFrame(Dpi::Bitmap &dst, int x0, int y0, int width, int height, QColor c
void sprite(Dpi::Canvas &canvas, GraphicSet &graphicSet, int xDst, int yDst,
int width, int height, int xGr, int yGr)
{
// dst = (dst AND mask) OR data: start from what is already on the canvas (when it is image backed).
Dpi::Bitmap scratch(width, height);
scratch.canvas().copyRect(QRect(0, 0, width, height), canvas, QRect(xDst, yDst, width, height));
scratch.canvas().end();
bitBltBitmap(scratch, 0, 0, width, height, graphicSet.mask, xGr, yGr, RasterOp::And);
bitBltBitmap(scratch, 0, 0, width, height, graphicSet.data, xGr, yGr, RasterOp::Paint);
canvas.draw(xDst, yDst, scratch.image());