[lua] Use SrcOver blend mode for GraphicsContext::drawImage()

This commit is contained in:
David Capello 2023-03-13 17:10:09 -03:00
parent e4d3e7d4cf
commit c280732fb1

View File

@ -66,9 +66,11 @@ void GraphicsContext::drawImage(const doc::Image* img,
0, 0,
srcRc.w, srcRc.h);
m_surface->drawSurface(tmpSurface.get(),
tmpSurface->bounds(),
dstRc);
// TODO add configuration for sampling method, and blend mode
os::Paint paint;
paint.blendMode(os::BlendMode::SrcOver);
m_surface->drawSurface(tmpSurface.get(), gfx::Rect(0, 0, srcRc.w, srcRc.h),
dstRc, os::Sampling(), &paint);
}
}