You are not logged in.
The current svn version doesn't draw a full circle there is a small section missing on a non filled circle
the following code draw a full circle.
inline void GRRLIB_Circle(f32 x, f32 y, f32 radius, u32 color, u8 filled) { Vector v[37]; u32 ncolor[37]; u32 a; f32 ra; f32 G_DTOR = M_DTOR * 10; for (a = 0; a < 37; a++) { ra = a * G_DTOR; v[a].x = cos(ra) * radius + x; v[a].y = sin(ra) * radius + y; v[a].z = 0.0f; ncolor[a] = color; } if (!filled) { GRRLIB_GXEngine(v, ncolor, 37, GX_LINESTRIP); } else { GRRLIB_GXEngine(v, ncolor, 37, GX_TRIANGLEFAN); } }
Last edited by eckyecky (2009-06-29 06:57:37)
Offline
I'd like to say that this function should be by default a elpise drawing one (have diferent vars for X and Y radius). To draw a circle just use the same radius.
Offline
I agree with suloku
Call the function GRRLIB_Elipse() and add the extra pram
If you wish, you can then add a GRRLIB_Circle which calls Elipse with a duplicated parameter (for friendly programmer interface)
Offline