[gnome-music/wip/mschraal/default-icon-cleanups: 6/24] defaulticon: Fix cover icons edge blur




commit b56a33f5eb4fb230ba20920e79690b32a9650216
Author: Marinus Schraal <mschraal gnome org>
Date:   Wed Aug 25 00:05:01 2021 +0200

    defaulticon: Fix cover icons edge blur
    
    make_icon_frame still had the half unit shift for drawing to the
    Cairo pixel grid. Music no longer draws borders around the icons and now
    the offset made image edges slightly blurry.
    
    Remove the offset.
    
    Related: #464

 gnomemusic/defaulticon.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/defaulticon.py b/gnomemusic/defaulticon.py
index c65c6bb19..6606743d2 100644
--- a/gnomemusic/defaulticon.py
+++ b/gnomemusic/defaulticon.py
@@ -70,11 +70,11 @@ def make_icon_frame(
     if round_shape:
         ctx.arc(w / 2, h / 2, w / 2, 0, 2 * pi)
     else:
-        ctx.arc(w - radius, radius, radius - 0.5, -90 * degrees, 0 * degrees)
+        ctx.arc(w - radius, radius, radius, -90 * degrees, 0 * degrees)
         ctx.arc(
-            w - radius, h - radius, radius - 0.5, 0 * degrees, 90 * degrees)
-        ctx.arc(radius, h - radius, radius - 0.5, 90 * degrees, 180 * degrees)
-        ctx.arc(radius, radius, radius - 0.5, 180 * degrees, 270 * degrees)
+            w - radius, h - radius, radius, 0 * degrees, 90 * degrees)
+        ctx.arc(radius, h - radius, radius, 90 * degrees, 180 * degrees)
+        ctx.arc(radius, radius, radius, 180 * degrees, 270 * degrees)
 
     if default_icon:
         ctx.set_source_rgb(1, 1, 1)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]