Straight Line Equation between two points

Posted by dafero on Stack Overflow See other posts from Stack Overflow or by dafero
Published on 2010-06-14T16:58:06Z Indexed on 2010/06/14 17:02 UTC
Read the original article Hit count: 264

Filed under:
|
|

Hi, I need to paint the line witch links two points.

I developed my own solution using the straight line equation, but my results are different than using the "professional" programs (such as GIMP or even MS Paint).

Here is a example of what I want: alt text

But my algorithm does this: alt text

*The green point is out of the figure and this is not possible.

Any ideas? Anyone know which code is been using for this, in "professional" apps?

Thanks! Daniel.

© Stack Overflow or respective owner

Related posts about line

Related posts about paint