IGxRect.DeflateS

Syntax

DeflateS(Size: IGxSize);

Parameters

Size - size, by which it is necessary to reduce.

Description

The DeflateS method decreases the integer rectangle to a size passed by the Size parameter.

Example

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

Var

Obj: ITabObject;

Rect: IGxRect;

Size: IGxSize;

Begin

Rect:=New GxRect.Create(0,0,Math.RandBetweenI(0,60),Math.RandBetweenI(0,60));

Size:=New GxSize.Create(Math.RandBetweenI(0,14),Math.RandBetweenI(0,14));

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

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

Rect.DeflateS(Size);

Obj.Rectangle:=Rect.ToRectF;

End Sub Button1OnClick;

After executing the example clicking the button creates an image in the regular report. The image source is the 1.bmp file. The image with the random size is created and is decreased by a random size.

See also:

IGxRect