Hallo Heinz!
Vielleicht hilft dir das weiter.
// Zeichnet eine X-belibige Linie
// Kompakte Variante des Bresenham-Algorithmus
// von der Wikipedia Seite Bresenham-Algorithmus
void GLCD_line (uint8_t x, uint8_t y, uint8_t x1, uint8_t y1, uint8_t
status)
{
int dx = abs(x1-x), sx = x<x1 ? 1 : -1;
int dy = -abs(y1-y), sy = y<y1 ? 1 : -1;
int err = dx+dy, e2; /* error value e_xy */
for(;;)
{ /* loop */
GLCD_pixel(x,y,status);
if (x == x1 && y == y1) break;
e2 = 2*err;
if (e2 > dy) { err += dy; x += sx; } /* e_xy+e_x > 0 */
if (e2 < dx) { err += dx; y += sy; } /* e_xy+e_y < 0 */
}
}