IGxRectF.ContainsR

Syntax

ContainsR(Rect: IGxRectF): Boolean;

Parameters

Rect - rectangle that is necessary to check.

Description

The ContainsR method returns True if the real rectangle passed by the Rect parameter is contained in this rectangle.

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,32.6),Math.RandBetween(0,28.36));

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

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.ContainsR(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 the 1.bmp and 2.bmp files. The S variable contains Yes if the rectangle that bounds the second image is included to the rectangle that bounds the first image.

See also:

IGxRectF