IGxRectF.Equals

Syntax

Equals(Rect: IGxRectF): Boolean;

Parameters

Rect - real rectangle that is compared with.

Description

The Equals method checks if this real rectangle is equal to the rectangle passed by the Rect parameter.

Example

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

Var

Obj, Obj1: ITabObject;

RectF, RectF1: IGxRectF;

s: String;

Begin

RectF:=New GxRectF.Create(0,0,Math.RandBetween(0,10),Math.RandBetween(0,10));

RectF1:=New GxRectF.Create(0,0,Math.RandBetween(0,10),Math.RandBetween(0,10));

Obj:=UiTabSheet1.TabSheet.Objects.Add("PrxPicture", RectF);

Obj1:=UiTabSheet1.TabSheet.Objects.Add("PrxPicture", RectF1);

(Obj As IPrxPicture).Image:=GxImage.FromFile("c:\1.bmp");

(Obj1 As IPrxPicture).Image:=GxImage.FromFile("c:\2.bmp");

If RectF.Equals(RectF1) Then

s:="Yes";

Else

s:="No";

End If;

End Sub Button1OnClick;

After executing the example clicking the button creates two images in the regular report. Image sources are 1.bmp and 2.bmp files. The S variable contains Yes if the bounds of the rectangles that bound the images are equal.

See also:

IGxRectF