this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fixed drawing with negative radius for circ() elli() apis #1902

+3
+3
src/core/draw.c
··· 496 496 497 497 static void drawEllipse(tic_mem* memory, s32 x0, s32 y0, s32 x1, s32 y1, u8 color, PixelFunc pix) 498 498 { 499 + if(x0 > x1 || y0 > y1) 500 + return; 501 + 499 502 s64 a = abs(x1 - x0), b = abs(y1 - y0), b1 = b & 1; /* values of diameter */ 500 503 s64 dx = 4 * (1 - a) * b * b, dy = 4 * (b1 + 1) * a * a; /* error increment */ 501 504 s64 err = dx + dy + b1 * a * a, e2; /* error of 1.step */