Equals(Rect: IGxRect): Boolean;
Rect - integer rectangle that is compared with.
The Equals method checks if this integer rectangle is equal to the rectangle passed by the Rect parameter.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Obj, Obj1: ITabObject;
Rect, Rect1: IGxRect;
s: String;
Begin
Rect:=New GxRect.Create(0,0,Math.RandBetweenI(0,10),Math.RandBetweenI(0,10));
Rect1:=New GxRect.Create(0,0,Math.RandBetweenI(0,10),Math.RandBetweenI(0,10));
Obj:=UiTabSheet1.TabSheet.Objects.Add("PrxPicture", Rect.ToRectF);
Obj1:=UiTabSheet1.TabSheet.Objects.Add("PrxPicture", Rect1.ToRectF);
(Obj As IPrxPicture).Image:=GxImage.FromFile("c:\1.bmp");
(Obj1 As IPrxPicture).Image:=GxImage.FromFile("c:\2.bmp");
If Rect.Equals(Rect1) 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 the 1.bmp and 2.bmp files. The S variable contains Yes if bounds of the rectangles that bound the images are equal.
See also: