All pastes #57624 Raw Edit

Anonymous

public text v1 · immutable
#57624 ·published 2006-05-21 15:50 UTC
rendered paste body
static void
set_color (cairo_t *ct, int color)
{
	int R,G,B;

	R = (color & 0x00FF0000) >> 16;
	G = (color & 0x0000FF00) >> 8;
	B = (color & 0x000000FF);
	cairo_set_source_rgb (ct, (double) R / 255.0, (double) G / 255.0, (double) B / 255.0);
}

static void
draw_background (cairo_t *ct, int backcolor, int hatch_size)
{
	set_color (ct, backcolor);
	cairo_rectangle (ct, 0, 0, hatch_size, hatch_size);
	cairo_fill (ct);
}