I am attempting to draw an arrow which has a border or a outline. I am drawing this arrow as an overlay within a third-party program. Here is a simplified example of that code.
private void DrawWindArrow(Graphics Screen, int screenWidth, int screenHeight)
{
Trace.WriteLine("Entering...DrawWindArrow");
NArrow.FontSize = 10;
NArrow.CenterText = 20;
NArrow.Scale = GetScale(NArrow.Size);
NArrow.Scale += 0.2f;
NArrow.Calc开发者_如何学CulateArrowSize(NArrow.Scale);
NArrow.FontSize = ChangeFontSize(NArrow.Size);
NArrow.CoordinateX = GetXCoordinates(NArrow.Position, screenWidth);
NArrow.CoordinateY = GetYCoordinates(NArrow.Position, screenHeight);
NArrow.CenterText = CenterText(NArrow.Size, NArrow.CoordinateX);
NArrow.CalculateArrowProperties();
NArrow.CenterOfArrowy = NArrow.CenterOfArrow + NArrow.CoordinateY;
NArrow.CenterOfArrow += NArrow.CoordinateX;
}
}
Here is an example of the arrow I am looking for:
At the end of the day I ended up redesigning and refactoring the orignal code in its entirely. What I ended up doing was drawing a smaller arrow based on a ratio of the original arrow.
In the end I was able to figure out, there wasn't a single thing I did, I simply used a different approach.
精彩评论