Get position array following a line - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Get position array following a line

I'm trying to do basic GDI animations with bitmaps. What I want to do is make a bitmap move towards a point.
I want the bitmap move in small steps towards this point.
So what I really want to know is how I can get a Point array of all the small steps to this position so I can redraw anything on each position.

I think if I where to make this a function it would have this look. I can't figure out how to make the logic.

Point[] GetLineSteps(Point startxy, Point stopxy)

Return LineSteps;

Appreciate your help.
Sign In or Register to comment.