布氏线算法(厚度)厚度、算法、布氏线

由网友(没心还会疼么)分享简介:我想知道是否有人知道任何的算法得出具有特定厚度的线的基础上,布氏线算法或任何类似的。I was wondering if anyone knew of any algorithm to draw a line with specific thickness, based on Bresenham's line alg...

我想知道是否有人知道任何的算法得出具有特定厚度的线的基础上,布氏线算法或任何类似的。

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.

在第二个想法,我一直在思索着每一个与setPixel(X,Y),我只是画一个圆圈,例如:

On a second thought, I've been wondering about for each setPixel(x,y) I'd just draw a circle, e.g.:

filledCircle(X,Y,厚度);对于每一个的x,y但是这将当然是很慢的。我还试图用字典,而是将填补内存在任何时间。检查我即将画上,如果他们有相同颜色的像素,但是这也不能有效地不够大刷子。

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.

也许我可以以某种方式画半圈视的角度?

Perhaps I could somehow draw half circles depending on the angle?

任何投入将是AP preciated。

Any input would be appreciated.

感谢。

复制: how我创建任意厚度的使用布氏行?

推荐答案

您不能实际绘制沿线圈。这种方法是专利。 :) 你仍然可以读取专利的灵感。

You cannot actually draw circles along the line. This approach is patented. :) You can still read patent for inspiration.

阅读全文

相关推荐

最新文章