From 1f5dbfe89751e2f56a93f18e8e6280d85457b2f0 Mon Sep 17 00:00:00 2001
From: "tanguy.cavagna" <tanguy.cavagna@etu.hesge.ch>
Date: Tue, 13 Jul 2021 00:45:42 +0200
Subject: [PATCH] Missing pixel in circle outline fixed

---
 draw/draw.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/draw/draw.c b/draw/draw.c
index 18e44be..24368a1 100644
--- a/draw/draw.c
+++ b/draw/draw.c
@@ -101,15 +101,15 @@ void gfx_draw_circle(struct gfx_context_t *ctxt, coordinates_t c, int r, uint32_
 
         // Rotate
         if (d >= 2 * x) {
-            d -= (2 * x) - 1;
             x += 1;
+            d -= (2 * x) - 1;
         } else if (d < 2 * (r - y)) {
-            d += (2 * y) - 1;
             y -= 1;
+            d += (2 * y) - 1;
         } else {
-            d += 2 * (y - x - 1);
             y -= 1;
             x += 1;
+            d += 2 * (y - x - 1);
         }
     }
 }
\ No newline at end of file
-- 
GitLab