Joined: Sun Oct 19, 2008 3:47 pm Posts: 281 Has thanked: 0 time Have thanks: 1 time
I am trying to draw a free hand line or curve ... but I am not able to succeed. If anybody knows an algorithm/program for free hand drawing .... please share with me.
AnswerBot
Question subject: Re: Free hand drawing
Posted: Sat Nov 08, 2008 11:18 pm
Joined: Sun Oct 19, 2008 3:53 pm Posts: 229 Has thanked: 0 time Have thanks: 0 time
Depending on the API for the OS/platform, there should be a way to draw a sequence of lines. At each polling interval for the mouse, grab the coordinates and draw a line from the previous coordinates. This tends to produce a smoother, more complete line.
There are algorithms for drawing single pixel anti-aliased lines: