Exemplo n.º 1
0
static void init_sepia_tones(GP_Pixel pixels[PIX], GP_PixelType pixel_type)
{
//	pixels[0] = GP_RGBToPixel(56, 33, 10, pixel_type);
//	pixels[1] = GP_RGBToPixel(255, 255, 255, pixel_type);
	pixels[0] = GP_RGBToPixel(0, 0, 0, pixel_type);
	pixels[1] = GP_RGBToPixel(162, 116, 70, pixel_type);
	pixels[2] = GP_RGBToPixel(230, 230, 230, pixel_type);
}
Exemplo n.º 2
0
void redraw_screen(void)
{
	if (pause_flag)
		return;

	/* Pick a random color for drawing. */
	GP_Pixel pixel;
	pixel = GP_RGBToPixel(random() % 256, random() % 256,
	                      random() % 256, win->context->pixel_type);

	switch (shape) {
	case SHAPE_CIRCLE:
		draw_random_circle(pixel);
	break;
	case SHAPE_ELLIPSE:
		draw_random_ellipse(pixel);
	break;
	case SHAPE_TRIANGLE:
		draw_random_triangle(pixel);
	break;
	case SHAPE_RECTANGLE:
		draw_random_rectangle(pixel);
	break;
	case SHAPE_TETRAGON:
		draw_random_tetragon(pixel);
	break;
	case SHAPE_POLYGON:
		draw_random_polygon(pixel);
	break;
	case SHAPE_RECTANGLE_AA:
		draw_random_rectangle_AA(pixel);
	break;
	}
}