IGxPoint.Equals

Syntax

Equals(Point: IGxPoint): Booelan;

Parameters

Point. The point used for comparison.

Description

The Equals method checks if this point is equal to the point that is passed by the Point parameter.

Example

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Point: IGxPoint;

Link, Link1: IWxLink;

s: String;

b: Boolean;

Begin

Point:=New GxPoint.Create(0,0);

Link:=UiWorkspace1.WxWorkspace.CreateLink;

Link1:=UiWorkspace1.WxWorkspace.CreateLink;

Link.BeginUpdate;

Link1.BeginUpdate;

Point.X:=Math.RandBetweenI(0,100);

Link.FirstPoint:=Point.ToPointF;

Point.X:=Math.RandBetweenI(0,100);

Link1.LastPoint:=Point.ToPointF;

Link.EndUpdate;

Link1.EndUpdate;

b:=Link.FirstPoint.ToPoint.Equals(Link1.FirstPoint.ToPoint);

If b Then

s:="Yes";

Else

s:="No";

End If;

End Sub Button1OnClick;

After executing the example clicking the button creates two connecting lines in the workspace, and the "s" variable contains Yes if the X coordinate of the current lines end points coincides.

See also:

IGxPoint