IGxRectF.OffsetP

Syntax

OffsetP(Point: IGxPointF);

Parameters

Point - point, to which the offset is made.

Description

The OffsetP method offsets the real rectangle to the point passed by the Point parameter.

Example

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

Var

Obj: ITabObject;

RectF: IGxRectF;

PointF: IGxPointF;

Begin

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

PointF:=New GxPointF.Create(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.OffsetP(PointF);

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 to the point with random coordinates.

See also:

IGxRectF