IGxPointF.Equals

Syntax

Equals(Point: IGxPointF): Boolean;

Parameters

Point. The point, with which the comparison is made.

Description

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

Example

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(00);
    Link := UiWorkspace1.WxWorkspace.CreateLink;
    Link1 := UiWorkspace1.WxWorkspace.CreateLink;
    Link.BeginUpdate;
    Link1.BeginUpdate;
    PointF.X := Math.RandBetween(0111.35);
    Link.FirstPoint := PointF;
    PointF.X := Math.RandBetween(0111.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:

IGxPointF