title: Bresenham line algorithm (thickness)
body: <p>I was wondering if anyone knew of any algorithm to draw a line with specific thickness, based on Bresenham's line algorithm or any similar.</p>
  
  <p>On a second thought, I've been wondering about for each setPixel(x,y) I'd just draw a circle, e.g.:</p>
  
  <p>filledCircle(x,y,thickness); for every x,y but that would of course be very slow. I also tried to use dictionary but that would fill the memory in no time. Check the pixels I'm about to draw on if they have the same color, but that's also not efficient enough for large brushes.</p>
  
  <p>Perhaps I could somehow draw half circles depending on the angle?</p>
  
  <p>Any input would be appreciated.</p>
  
  <p>Thanks.</p>
  
  <p><strong>duplicate:</strong> <a href="https://stackoverflow.com/questions/1222713/how-do-i-create-a-line-of-arbitrary-thickness-using-bresenham">how do I create a line of arbitrary thickness using Bresenham?</a></p>