Beispiel #1
0
void dpf_fill (uint8_t r, uint8_t g, uint8_t b) {
	uint16_t x;
	uint16_t y;
	uint8_t *bytes = image;
	for (y = 0; y < DISPLAY_H; y++) {
		for (x = 0; x < DISPLAY_W; x++) {
			*bytes++ = RGB565_0(r, g, b + y / 2);
			*bytes++ = RGB565_1(r, g, b + y / 2);
		}
	}
}
Beispiel #2
0
int demo0(DPFHANDLE h)
{
	static unsigned char image[2 * 128 * 128];
	int x, y;
	int i;
	for (i = 0; i < 127; i++) {
		unsigned char *b = image;
		for (y = 0; y < 128; y++) {
			for (x = 0; x < 128; x++) {
				*b++ = RGB565_0(x * 2 + i, y * 2 + i, i);
				*b++ = RGB565_1(x * 2 + i, y * 2 + i, i);
			}
		}
		write_screen(h, image, sizeof(image));
	}
	return 0;
}
Beispiel #3
0
void dpf_set (uint16_t x, uint16_t y, uint8_t r, uint8_t g, uint8_t b) {
	image[2 * (y * DISPLAY_W + x) + 0] = RGB565_0(r, g, b);
	image[2 * (y * DISPLAY_W + x) + 1] = RGB565_1(r, g, b);
}