Esempio n. 1
0
static void magic(struct Bitmap *bitmap, coord_t x, coord_t y)
{
	static const coord_t coords[] = { 120, 34, 90, 90, 30, 90, 0, 34, 60, 0, 90, 90, 0, 34, 120, 34, 30, 90, 60, 0 };
	unsigned int i;

	gfx_moveTo(bitmap, coords[countof(coords)-2]/2 + x, coords[countof(coords)-1]/3 + y);
	for (i = 0; i < countof(coords); i += 2)
		gfx_lineTo(bitmap, coords[i]/2 + x, coords[i+1]/3 + y);
}
Esempio n. 2
0
/**
 * Draw a line from the current pen position to the new coordinates.
 *
 * \note This function moves the current pen position to the
 *       new coordinates.
 *
 * \sa gfx_line()
 */
void gfx_lineTo(Bitmap *bm, coord_t x, coord_t y)
{
	gfx_line(bm, bm->penX, bm->penY, x, y);
	gfx_moveTo(bm, x, y);
}