Canvas line
From Lazarus wiki
Jump to navigationJump to searchThe canvas.line(x1, y1, x2, y2) statement will draw a line from point (x1, y1) to (x2, y2).
The coordinates of the canvas are:
This code will draw the diagonals in a form:
procedure TForm1.Button1Click(Sender: TObject);
begin
canvas.Line(0,0, form1.Width,form1.Height);
canvas.Line(0,form1.height,form1.width,0);
end;