Source

pebble / cube / src / draw.h

/** \file
 * Line and pixel drawing routines.
 * Using a virtual screen buffer that is twice the resolution
 * along each axis so that anti-aliasing can be done later.
 */
#ifndef _draw_h_

#define SCREEN_WIDTH 144
#define SCREEN_HEIGHT 168

#define VSCREEN_SHIFT 1
#define VSCREEN_WIDTH (SCREEN_WIDTH << VSCREEN_SHIFT)
#define VSCREEN_HEIGHT (SCREEN_HEIGHT << VSCREEN_SHIFT)


/* Draw a pixel in vscreen coordinates */
void
draw_pixel(
	int c,
	int x,
	int y
);


/* Draw a non-antialised line using Bresenham's_line_algorithm
 * in vscreen coordinates */
void
draw_line(
	int c,
	int x0,
	int y0,
	int x1,
	int y1
);


#endif