procedure TForm4.Button1Click(Sender: TObject);
var
  g: TGPGraphics;
  p: TGPPen;
begin
  g := TGPGraphics.Create(Canvas.Handle);
  p := TGPPen.Create(aclBlack, 20);

  g.DrawLine(p, Button1.Left, Button1.Top + Button1.Height + 50, Button1.Left + Button1.Width, Button1.Top + Button1.Height + 50);

  g.Free;
  p.Free;
end;

 

posted on 2017-02-05 11:12  del88  阅读(216)  评论(0编辑  收藏  举报