Animate a e.Graphics.DrawLine with arrowhead

Posted by Fer on Stack Overflow See other posts from Stack Overflow or by Fer
Published on 2010-03-16T04:34:52Z Indexed on 2010/04/20 10:03 UTC
Read the original article Hit count: 196

Filed under:
|
|

I need to "animate" an arrow. It can go in any direction (up, down, left, right and diagonals) and the arrowhead will be at the end. It needs to appear as if it is growing from orgin to the end. To make matters more complicated it has to be in a user control so it is possible to add to the controls collection in the forms and remove it to delete it from the screen, and its background is really transparent (no color.transparent) so i can't paint the background to "clear" the previous line. I have it static already (drawn from origin to end) but i can't animate it. I tried to add a timer in the user control but I fail to get a correct algorithm to calculate the intermediate ends of the line while it is growing. Any help would be appreciated. Thanks

© Stack Overflow or respective owner

Related posts about c#

Related posts about drawing