IGxPoint.Offset

Syntax

Offset(DX: Integer, DY: Integer);

Parameters

DX. Offset by X.

DY. Offset by Y.

Description

The Offset method shifts the point by DX along the X axis and by DY along the Y axis.

Example

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

Var

Point: IGxPoint;

Link: IWxLink;

Begin

Point:=New GxPoint.Create(0,0);

Link:=UiWorkspace1.WxWorkspace.CreateLink;

Link.BeginUpdate;

Point.Offset(40,45);

Link.LastPoint:=Point.ToPointF;

Link.EndUpdate;

End Sub Button1OnClick;

After executing the example clicking the button creates a connecting line in the workspace, and its end point is shifted by 40 along the X axis and by 45 along the Y axis.

See also:

IGxPoint