请输入您要查询的百科知识:

 

词条 贝尔赛尔样条曲线
释义

贝尔赛尔样条曲线是使用GDI(Graphics DeviceInterface,图像设备借口)在窗体中绘制的一种曲线图形。函数结构如下:public void DrawBezier(Pen pen,Point p1,Point p2,Point p3,Point p4):Point表示点的坐标。

public void DrawBezier(Pen pen,PointF p1,PointF p2,PointF p3,PointF p4)。

public void DrawBezier(Pen pen,float x1,float y1,float x2,float y2,float x3,float y3,float x4,float y4)。

实例如下:

private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)

{

Graphics g = this.CreateGraphics();

Pen Mypen = new Pen(Color.Blue,2);

Point p1 = new Point(50,50);

Point p2 = new Point(70, 25);

Point p3 = new Point(100, 30);

Point p4 = new Point(120, 85);

g.DrawBezier(Mypen,p1,p2,p3,p4);

g.DrawBezier(Mypen,20,10,60,40,80,45,90,10);

}

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/26 6:31:27