mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 17:16:04 +00:00
LibGfx: Don't blend opaque pixels
This commit is contained in:
parent
e3c64a0858
commit
6c27f2c071
Notes:
sideshowbarker
2024-07-17 02:56:54 +09:00
Author: https://github.com/MacDue
Commit: 6c27f2c071
Pull-request: https://github.com/SerenityOS/serenity/pull/16558
1 changed files with 1 additions and 1 deletions
|
@ -1832,7 +1832,7 @@ void Painter::set_pixel(IntPoint p, Color color, bool blend)
|
||||||
if (!clip_rect().contains(point / scale()))
|
if (!clip_rect().contains(point / scale()))
|
||||||
return;
|
return;
|
||||||
auto& dst = m_target->scanline(point.y())[point.x()];
|
auto& dst = m_target->scanline(point.y())[point.x()];
|
||||||
if (!blend)
|
if (!blend || color.alpha() == 255)
|
||||||
dst = color.value();
|
dst = color.value();
|
||||||
else if (color.alpha())
|
else if (color.alpha())
|
||||||
dst = Color::from_argb(dst).blend(color).value();
|
dst = Color::from_argb(dst).blend(color).value();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue