zoukankan      html  css  js  c++  java
  • 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>
    

     

    每天进步一点点。
  • 相关阅读:
    zookeeper03
    微服务网关Zuul
    微服务网关概述
    服务熔断Hystrix高级
    服务熔断Hystrix入门
    微服务架构的高并发问题
    服务注册和发现总结
    服务调用Feign高级
    服务调用Feign入门
    负载均衡Ribbon高级
  • 原文地址:https://www.cnblogs.com/snow-zhang/p/10173786.html
Copyright © 2011-2022 走看看