protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Graphics g = e.Graphics;
Point p1 = new Point(50, 200);
Point p2 = new Point(50, 150);
Point p3 = new Point(120, 150);
Point p4 = new Point(200, 200);
Point p11 = new Point(50, 200);
Point p22 = new Point(50, 250);
Point p33 = new Point(120, 250);
Point p44 = new Point(200, 200);
GraphicsPath gp = new GraphicsPath();
gp.AddBezier(p1, p2, p3, p4);
gp.AddLine(p1, p4);
g.FillPath(new SolidBrush(Color.Red), gp);
gp = new GraphicsPath();
gp.AddBezier(p11, p22, p33, p44);
gp.AddLine(p11, p44);
g.FillPath(new SolidBrush(Color.Red), gp);
}
(C#)贝塞尔曲线画水滴
最新推荐文章于 2025-03-21 14:48:06 发布