Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Finding a Point on a Line

$
0
0

I would like your help on a math/GDI+ problem.  I want to find a point on a line, given the starting point on a line and a distance in pixels.  I'm using C# on Windows Forms.

Given a line from x0,y0 to x1,y1 and a starting point on that line of x2,y2 I would like to know the point value a certain number of pixels away.

So...

private PointF GetPointOnLine(RectangleF rc, PointF start, float distance)

Where rc is the bounding rect of the line, start is a point on that line, and distance is the number of pixels along the line from the starting point.


Viewing all articles
Browse latest Browse all 12583

Latest Images

Trending Articles



Latest Images