I'm trying to draw a custom dashed line, but I want to put an image inside of this dashed line. The orientation of my line is variable.
The aircraft in the middle of the line is an image. I don't want to draw a line, draw the image, and draw another line, because i've got a dynamic angle calculated with an arcTan. The X length is fix and known, the Y red Line can change.
What I have tried:
I tried to draw a line, draw the image, and draw another line but it's not perfect, because of the variable angle.
That's a part of my code :
Image aircraftLogo = Image.FromFile(PATH);
decimal arctanValue = Decimal.Divide(X, Y);
double aircraftLogoRotation = -Math.Atan(Convert.ToDouble(arctanValue)) * (180 / Math.PI);
float moveX = aircraftLogo.Width / 2f + X;
float moveY = aircraftLogo.Height / 2f + Y;
g.DrawImage(aicraftLogo, X, Y, width, Height);
I'm a beginner in C#.
Thanks for your help.