// create the circular status animation
static void create_status() {

	int i;
	int xpie[] = {  0,  3, 6,  3, 0, -3, -6, -3 }; 
	int ypie[] = { -6, -3, 0,  3, 6,  3,  0, -3 }; 

	// we need 16 frames
	GrSetGCForeground (mandel_gc, appearance_get_color( CS_TITLEBG ));

	for (i=0;i<16;i++) {
		status_image[i] = GrNewPixmap(12, 12,  NULL);
		GrFillRect(status_image[i],mandel_gc,0,0,12,12);	
	}
	
	// the background
	for (i=1;i<8;i++) {
		GrSetGCForeground(mandel_gc, appearance_get_color(CS_TITLEFG));
		GrFillEllipse(status_image[i],mandel_gc,6,6,6,6);
		GrSetGCForeground(mandel_gc, appearance_get_color(CS_TITLEBG));
		GrArc(status_image[i],mandel_gc,6,6,6,6,0,-6,xpie[i],ypie[i],MWPIE);
	}
	// the foreground part
	GrSetGCForeground(mandel_gc, appearance_get_color(CS_TITLEFG));
	GrFillEllipse(status_image[8],mandel_gc,6,6,6,6);
	for (i=9;i<16;i++) GrArc(status_image[i],mandel_gc,6,6,6,6,0,-6,xpie[i-8],ypie[i-8],MWPIE);
}
Beispiel #2
0
static void
GrArcWrapper(void *r)
{
	nxArcReq *req = r;

	GrArc(req->drawid, req->gcid, req->x, req->y, req->rx, req->ry,
		req->ax, req->ay, req->bx, req->by, req->type);
}