IGxRectF.Offset

Syntax

Offset(DX: Double; DY: Double);

Parameters

DX - offset along the X axis.

DY - offset along the Y axis.

Description

The Offset method shifts the real rectangle on DX along the X axis and on DY along the Y axis.

Example

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

Var

Obj: ITabObject;

RectF: IGxRectF;

Begin

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

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

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

RectF.Offset(20.5,7.5);

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 on 20.5 to the left and on 7.5 to the bottom.

See also:

IGxRectF