A straight line generator for drawing a straight line in a discrete coordinate system comprised of pixels, each pixel having a first coordinate and a second coordinate, said straight line having a slope, a start pixel and an end pixel, said generator determining the coordinates for intermediate pixels between the start and end pixels and comprising:
- means for storing the first and second coordinates of at least a current intermediate pixel;
- a region code register for storing a region code indicative of a relation of the coordinates of the end pixel to the coordinates of the start pixel and of the slope of said straight line;
- an error register for storing an error term obtained using a Bresenham algorithm;
- a first register for storing a first error update value;
- a second register for storing a second error update value;
- an adder for selecting an error update value from the first and second registers and for adding the selected error update value to the error term in the error register;
- control logic for successively updating the current first and second coordinates in the means for storing on the basis of said region code and said error term and for controlling the selection of error update values by said adder.