Corran Webster
e70048cf59
extmod/modframebuf: Fix 0 radius bug in FrameBuffer.ellipse.
...
This fixes a bug in FrameBuffer.ellipse where it goes into an infinite loop
if both radii are 0.
This fixes the bug with a simple pre-check to see if both radii are 0, and
in that case sets a single pixel at the center. This is consistent with the
behaviour of the method when called with just one of the radii set to 0,
where it will draw a horizontal or vertical line of 1 pixel width.
The pixel is set with setpixel_checked so it should handle out-of-bounds
drawing correctly.
This fix also includes three new tests: one for the default behaviour, one
for drawing out-of-bounds, and one for when the sector mask is 0.
Fixes issue #16053 .
Signed-off-by: Corran Webster <cwebster@unital.dev >
2024-11-28 22:56:44 +11:00
..
2024-02-28 15:48:51 +11:00
2024-03-07 16:25:17 +11:00
2024-03-16 12:19:12 +11:00
2024-03-07 14:20:42 +11:00
2024-09-06 17:14:03 +10:00
2017-07-18 11:57:39 +10:00
2024-10-25 01:16:06 +11:00
2024-11-05 11:27:06 +11:00
2024-08-29 23:46:13 +10:00
2024-10-25 01:16:06 +11:00
2022-05-05 13:30:40 +10:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-08 13:31:02 +11:00
2024-03-15 12:04:34 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-15 12:04:25 +11:00
2024-07-12 22:59:31 +10:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-07-02 10:23:26 +10:00
2024-03-07 14:20:42 +11:00
2023-12-22 10:26:52 +11:00
2024-06-20 00:11:05 +10:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-07-22 10:42:29 +10:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-11-28 22:56:44 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-11-13 11:44:09 +11:00
2024-07-20 12:18:07 +10:00
2024-03-15 14:22:11 +11:00
2024-08-29 23:46:13 +10:00
2024-08-29 23:46:13 +10:00
2024-03-07 14:20:42 +11:00
2024-08-08 17:59:32 +10:00
2024-08-08 17:59:32 +10:00
2024-03-15 18:11:28 +11:00
2024-08-08 18:02:21 +10:00
2024-03-15 18:11:28 +11:00
2024-07-20 12:32:31 +10:00
2024-03-07 14:20:42 +11:00
2024-06-17 13:12:54 +10:00
2024-03-07 14:20:42 +11:00
2024-08-14 12:55:45 +10:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2023-06-08 17:54:14 +10:00
2024-03-28 17:36:13 +11:00
2024-10-25 01:16:06 +11:00
2024-07-22 14:40:45 +10:00
2024-03-07 14:20:42 +11:00
2024-07-04 15:55:03 +10:00
2024-03-07 14:20:42 +11:00
2023-06-08 17:54:14 +10:00
2020-09-08 11:41:31 +10:00
2022-06-03 11:53:28 +10:00
2024-11-20 14:42:26 +11:00
2019-06-03 16:47:35 +10:00
2024-07-04 15:55:03 +10:00
2024-07-04 15:55:03 +10:00
2024-07-12 01:03:46 +10:00
2024-11-13 13:11:32 +11:00
2024-10-23 16:29:28 +11:00
2024-03-16 10:59:03 +11:00
2024-11-13 14:21:29 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-07-23 11:39:17 +10:00
2019-10-29 12:12:37 +11:00
2024-03-07 14:20:42 +11:00
2019-10-29 14:17:29 +11:00
2024-03-07 14:20:42 +11:00
2024-07-04 15:55:03 +10:00
2024-10-09 15:03:07 +11:00
2024-07-04 15:55:03 +10:00
2018-06-06 14:33:42 +10:00
2024-03-07 14:20:42 +11:00
2024-07-23 12:13:49 +10:00
2022-05-25 13:04:45 +10:00
2022-09-19 19:06:07 +10:00
2017-07-18 11:57:39 +10:00