Commit 461d36a1 authored by Deucе's avatar Deucе 👌🏾
Browse files

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.
parent 634c8763
Pipeline #2139 passed with stage
in 7 minutes and 31 seconds
......@@ -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);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment