Equals(Point: IGxPointF): Boolean;
Point. The point, with which the comparison is made.
The Equals method checks if this point is equal to the point that is passed by the Point parameter.
Executing the example requires a form with the Button1 button, the UiWorkspace component named UiWorkspace1 and any visualizer, for which UiWorkspace1 is set as a data source.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
PointF: IGxPointF;
Link, Link1: IWxLink;
s: String;
Begin
PointF := New GxPointF.Create(0, 0);
Link := UiWorkspace1.WxWorkspace.CreateLink;
Link1 := UiWorkspace1.WxWorkspace.CreateLink;
Link.BeginUpdate;
Link1.BeginUpdate;
PointF.X := Math.RandBetween(0, 111.35);
Link.FirstPoint := PointF;
PointF.X := Math.RandBetween(0, 111.36);
Link1.LastPoint := PointF;
Link.EndUpdate;
Link1.EndUpdate;
If Link.FirstPoint.Equals(Link1.FirstPoint) Then
s := "Yes";
Else
s := "No";
End If;
End Sub Button1OnClick;
Clicking the button creates two connecting lines on the workspace, and the "s" variable contains Yes if the X coordinate of the current lines end points coincides.
See also: