zoukankan      html  css  js  c++  java
  • wpf 画五角星函数

    public void ABC()
    {

    var canvas = new Canvas();
    Content = canvas;
    var points =
    new List<Point>()
    {
    new Point(200, 200),
    new Point(400, 200),
    new Point(200, 330),
    new Point(300, 100),
    new Point(400, 330),
    new Point(200, 200)
    };
    var sb = new Storyboard();
    for (int i = 0; i < points.Count-1; i++)
    {
    var lineGeometry = new LineGeometry(points[i], points[i]);
    var path =
    new Path()
    {
    Stroke = Brushes.Red,
    StrokeThickness = 3,
    Data = lineGeometry
    };
    canvas.Children.Add(path);
    var animation =
    new PointAnimation(points[i], points[i + 1], new Duration(TimeSpan.FromMilliseconds(1000)))
    {
    BeginTime = TimeSpan.FromMilliseconds(i * 1000)
    };
    sb.Children.Add(animation);
    RegisterName("s" + i, lineGeometry);
    Storyboard.SetTargetName(animation, "s" + i);
    Storyboard.SetTargetProperty(animation, new PropertyPath(LineGeometry.StartPointProperty));
    }
    MouseDown += (s, e) => { sb.Begin(this); };

    }

  • 相关阅读:
    C++:Ubuntu 中GCC和G++的安装
    pycharm所有包
    机器学习--推荐引擎
    均值漂移法 + 轮廓系数+DBSCAN算法
    聚类模型
    事件预测 -- 解决分类问题
    网格搜索
    置信概率
    样本类别均衡化
    爬虫用到的知识点
  • 原文地址:https://www.cnblogs.com/tangyanzhi1111/p/11654067.html
Copyright © 2011-2022 走看看