B
borlandor
Unregistered / Unconfirmed
GUEST, unregistred user!
如何选中一条不规则曲线比如Bezier曲线,即判断光标是否落在这根线上。
假设画这条曲线时的Pen的宽度为2,如下:
procedure TForm1.Button2Click(Sender: TObject);
var Points: array[0..3] of TPoint;
begin
Canvas.Pen.Width := 2;
Points[0] := Point(100,200);
Points[1] := Point(200,100);
Points[2] := Point(300,300);
Points[3] := Point(400,200);
Canvas.PolyBezier(Points);
end;
多多指点,谢谢!
[?]
假设画这条曲线时的Pen的宽度为2,如下:
procedure TForm1.Button2Click(Sender: TObject);
var Points: array[0..3] of TPoint;
begin
Canvas.Pen.Width := 2;
Points[0] := Point(100,200);
Points[1] := Point(200,100);
Points[2] := Point(300,300);
Points[3] := Point(400,200);
Canvas.PolyBezier(Points);
end;
多多指点,谢谢!
[?]