📄 upolybezier.pas
字号:
unit UPolyBezier;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
procedure FormPaint(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormPaint(Sender: TObject);
var
Points: array[0..6] of TPoint; // points defining the bezier curver
begin
{define the bezier curve}
Points[0].X := 10;
Points[0].Y := 50;
Points[1].X := 40;
Points[1].Y := 90;
Points[2].X := 80;
Points[2].Y := 10;
Points[3].X := 110;
Points[3].Y := 50;
Points[4].X := 140;
Points[4].Y := 10;
Points[5].X := 180;
Points[5].Y := 90;
Points[6].X := 210;
Points[6].Y := 50;
{draw the bezier curve}
PolyBezier(Canvas.Handle, Points, 7);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -