Ejemplo n.º 1
0
static void
GrSetGCForegroundPixelValWrapper(void *r)
{
	nxSetGCForegroundPixelValReq *req = r;

	GrSetGCForegroundPixelVal(req->gcid, req->pixelval);
}
Ejemplo n.º 2
0
/*
 * Here to do an idle task when nothing else is happening.
 * Just draw a randomly colored filled circle in the small window.
 */
void
do_idle(void)
{
	GR_COORD	x;
	GR_COORD	y;
	GR_SIZE		rx;
	GR_SIZE		ry;
	GR_PIXELVAL	pixelval;

	x = rand() % 70;
	y = rand() % 40;
	rx = (rand() % 10) + 5;
	ry = (rx * si.ydpcm) / si.xdpcm;	/* make it appear circular */
	
	pixelval = rand() % si.ncolors;

	GrSetGCForegroundPixelVal(gc3, pixelval);
	GrFillEllipse(w2, gc3, x, y, rx, ry);	
}