Algorithm for drawing thick smooth lines

Are there any "standard" algorithms for drawing thick smooth lines? I found the Xiaolin Wu algorithm for drawing 1px lines, but have not yet found an extension for thicker lines.

+5
source share
2 answers

If your lines are always straight and you don’t look at curves with an alias, you can take a three-pass approach.

I'm not sure how effective this will be in your environment, but you can draw an alias version of the string with thickness - 2, and then use the Xiaolin Wu approach twice to smooth the edges. The @Francisco P. approach will work too and may be preferable.

, . , , , .

+2

, , (, 4x), . :

.

+3

All Articles