频道分类

Delphi Canvas.LineTo 画线

作者:admin 来源: 日期:2020/1/19 1:33:01 人气: 标签:

 
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
  { First call FillRect to paint the surface of the form.
    This removes any previously drawn lines (and anything else). }
  Canvas.FillRect(ClientRect);
  Canvas.MoveTo(0, 0);
  Canvas.LineTo(X, Y);
end;