请问,c# 有没有从中心点向周围填充的圆形画刷

解决方案 »

  1.   

    看看这个
    http://bbs.csdn.net/topics/190060746或者按照“径向渐变填充”Google下
      

  2.   

    C#没简单点的?比如,直接创建一个圆形画刷,然后fill就可以了
      

  3.   

    WPF的RadialGradientBrush可以http://technet.microsoft.com/zh-cn/library/aa970904%28v=vs.100%29?cs-save-lang=1&cs-lang=csharp#code-snippet-5
      

  4.   


    Paint Event:    Graphics g = e.Graphics;
        using (GraphicsPath path = new GraphicsPath())
        {
            path.AddEllipse(50, 50, 100, 100);
            //渐变填充GraphicsPath对象
            using (PathGradientBrush brush = new PathGradientBrush(path))
            {
                g.SmoothingMode = SmoothingMode.HighQuality;
                //渐变中心点颜色
                brush.CenterColor = Color.White;
                //渐变中心点位置
                brush.CenterPoint = new PointF(100f, 100f);
                brush.SurroundColors = new Color[] { Color.Black };
                g.FillPath(brush, path);
            }
        }