TGLine = packed record
case Integer of
0: (X1, Y1, X2, Y2: Longint);
1: (Pt1, Pt2: TPoint);
end;
class function TGPointUtils.PtInLine(APt: TPoint;
ALine: TGLine): Boolean;
begin
Result := (APt.Y - ALine.Pt1.Y) * (APt.X - ALine.Pt2.X) -
(APt.Y - ALine.Pt2.Y) * (APt.X - ALine.Pt1.X) = 0;
end;