Quellcode durchsuchen

LibGfx: Don't blend opaque pixels

MacDue vor 2 Jahren
Ursprung
Commit
6c27f2c071
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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();