1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibGfx: Don't blend opaque pixels

This commit is contained in:
MacDue 2022-12-17 19:55:44 +00:00 committed by Andreas Kling
parent e3c64a0858
commit 6c27f2c071

View file

@ -1832,7 +1832,7 @@ void Painter::set_pixel(IntPoint p, Color color, bool blend)
if (!clip_rect().contains(point / scale()))
return;
auto& dst = m_target->scanline(point.y())[point.x()];
if (!blend)
if (!blend || color.alpha() == 255)
dst = color.value();
else if (color.alpha())
dst = Color::from_argb(dst).blend(color).value();