• WPF画辐射图


       public void WriteLineCircle(double originX, double originY, double r, int lineCount,List<string> list)
            {
                for (int i = 0; i < lineCount; i++)
                {
                    list.Add("你好");
                    double xget = Math.Cos(2*Math.PI*i / lineCount)*r;
                    double yget = Math.Sin(2*Math.PI * i / lineCount)*r;
                    can.Children.Add(DrawLine(originX, originY, originX + xget, originY+yget, new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF0000")), 2));//
                    TextBlock text = new TextBlock();
                    text.Margin = new Thickness(originX + xget, originY + yget, 0, 0);
                    text.Text = list[i];
                    can.Children.Add(text);
                }
            }
    
            public Path DrawLine(double startX, double startY, double endXL, double endYL, Brush color, double thickness)
            {
                Path path = new Path
                {
                    Stroke = color,
                    StrokeThickness = thickness
                };
                LineGeometry line = new LineGeometry
                {
                    StartPoint = new Point(startX, startY),
                    EndPoint = new Point(endXL, endYL)
                };
                path.Data = line;
                return path;
            }
     <Canvas Height="800" Width="800" Name="can" Background="Azure"></Canvas>
    

     

    每天进步一点点。
  • 相关阅读:
    静态类、抽象类的笔记
    第一篇
    流复制操作
    速记服务器状态码
    访问修饰符
    jquery对象、js全局变量等tips
    Caching and Indexing
    Using X++ copy the favorites from one user to another
    SID
    Using X++ get Language List from Dynamics AX 2009
  • 原文地址:https://www.cnblogs.com/snow-zhang/p/10173786.html
Copyright © 2020-2023  润新知