开发者

How to draw an arrow with a border?

开发者 https://www.devze.com 2023-01-27 16:20 出处:网络
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.

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:

How to draw an arrow with a border?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号