From 461d36a14af5b78d0632e3e5260e11a9865d87c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Mon, 10 May 2021 12:26:59 -0400
Subject: [PATCH] Draw the ellipse pixel when the angle is equal to start/end
 as well

Being stritly less/greater causes a one pixel gap at the start/end
of the ellipse, meaning flood fills can escape.
---
 src/syncterm/ripper.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/syncterm/ripper.c b/src/syncterm/ripper.c
index b113aef29f..84ca939cfe 100644
--- a/src/syncterm/ripper.c
+++ b/src/syncterm/ripper.c
@@ -9863,7 +9863,7 @@ full_ellipse(int xc, int yc, int sa, int ea, int a, int b, bool fill, uint32_t c
 					}
 				}
 				if (rip.borders) {
-					if (sa < qangle && ea > qangle)
+					if (sa <= qangle && ea >= qangle)
 						set_pixel(xc-x, yc-y, colour);
 				}
 			}
@@ -9876,18 +9876,18 @@ full_ellipse(int xc, int yc, int sa, int ea, int a, int b, bool fill, uint32_t c
 				}
 				if (rip.borders) {
 					// Top-right quadrant.
-					if (sa < angle && ea > angle)
+					if (sa <= angle && ea >= angle)
 						set_pixel(xc+x, yc-y, colour);
 					// Bottom-left quadrant.
 					qangle = 180 + angle;
-					if (sa < qangle && ea > qangle)
+					if (sa <= qangle && ea >= qangle)
 						set_pixel(xc-x, yc+y, colour);
 				}
 			}
 			// Bottom-right quadrant
 			qangle = 360 - angle;
 			if (rip.borders) {
-				if (sa < qangle && ea > qangle)
+				if (sa <= qangle && ea >= qangle)
 					set_pixel(xc+x, yc+y, colour);
 			}
 		}
-- 
GitLab