IGxRectF.OffsetS

Syntax

OffsetS(Size: IGxSizeF);

Parameters

Size - size, by which the offset is made.

Description

The OffsetS method shifts the real rectangle by the size passed by the Size parameter.

Example

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

Var

Obj: ITabObject;

RectF: IGxRectF;

SizeF: IGxSizeF;

Begin

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

SizeF:=New GxSizeF.Create(Math.RandBetween(0,30),Math.RandBetween(0,30));

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

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

RectF.OffsetS(SizeF);

Obj.Rectangle:=RectF;

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 is created with the random size and is shifted by the SizeF size.

See also:

IGxRectF