All pastes #1901762 Raw Edit

filled circle

public c v1 · immutable
#1901762 ·published 2010-07-16 13:40 UTC
rendered paste body
static inline void drawFilledcircle(u16 *screenPtr, int cx, int cy, int radius, u8 r, u8 g, u8 b) {	int x;	int y;	int rr=radius*radius;	y=-radius;	do 	{		int yy=y*y;		x=-radius;		do 		{			if(((x*x)+yy-rr)<=0) 			{				fixPixel(screenPtr,x+cx,y+cy,r,g,b);			}		} while(++x<radius);	} while(++y<radius);}