how do I create a line of arbitrary thickness using Bresenham?

后端 未结 12 844
不知归路
不知归路 2020-12-01 03:31

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

12条回答
  •  情歌与酒
    2020-12-01 04:18

    http://members.chello.at/~easyfilter/bresenham.html

    The example at the bottom of this link is javascript, but should be easy enough to adapt to C. It's a fairly straightforward antialiasing algorithm to draw lines of variable thickness.

提交回复
热议问题