Main Site Documentation

Smoothing the lines


#1

If you have ever tried adding some extra flare to your user interface by placing graphics that use lines that are not 90° or 180° angles, you will have noticed that by default, the graphics library does not support any sort of anti-aliasing. Lines look hard and jagged…

Looking at the set of lines to the right of the image, you will notice the familiar lines drawn only with NETMF. Taking a look at the left side we see something a little different. What you are looking at on the left side of the image is the product of @ hagster’s hard work. @ hagster converted a publicly available algorithm to NETMF that allows the smoothing of lines through the use of anti-aliasing.

Be sure to head over to https://www.ghielectronics.com/community/codeshare/entry/891 to see the full details and example project. Also, be sure to remember to thank @ hagster for all his efforts and for sharing his code!

Links to several of the anti-aliasing processes: http://en.wikipedia.org/wiki/Anti-aliasing
The publicly available algorithm: http://en.wikipedia.org/wiki/Xiaolin_Wu’s_line_algorithm