瀏覽代碼

LibGfx: Don't blend opaque pixels

MacDue 2 年之前
父節點
當前提交
6c27f2c071
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibGfx/Painter.cpp

+ 1 - 1
Userland/Libraries/LibGfx/Painter.cpp

@@ -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();