I am currently using Bresenham\'s algorithm to draw lines but they are (of course) one pixel in thickness. My question is what is the most efficient way to draw lines of arb
for any width n where n is odd. for any point p plotted also plot the points above/below it for n/2 (if the line is > 45 degree angle draw side to side instead).
not really a proper line of the right thickness, more like an italic pen, but very fast.
for start point p(x,y) pick the points t0 and b such that they are centred on p but n pixels apart. for the end point do the same resulting in t1 b1. Draw lines from t0 -> t1, t1->b1, b1 -> t0, b0 -> t1. Fill in the resulting rectangle.
The trick here is picking the points such that they appear orthogonal to the path direction.
for each point p on the line instead of drawing a point draw a circle.
This has the advantage of making the end points 'clean' no matter what the orientation.
there should be no need to render any circles in solid except for the first.