IWxView.Offset

Syntax

Offset: IGxPointF;

Offset: Prognoz.Platform.Interop.Drawing.IGxPointF;

Description

The Offset property determines image offset relative to the workspace center.

Comments

By default, the workspace center matches the view center.

Example

Executing the example requires a form with the Button1 button, the WorkspaceBox component named WorkspaceBox1 and a data source for the WorkspaceBox1.

Add links to the Andy, Drawing, Workspace system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ws: IWxWorkspace;
    view: IWxView;
    ellipse: IWxEllipse;
Begin
    // Get workspace for editing
    ws := UiWorkspace1.WxWorkspace;
    view := ws.Views.Item(0);

    ellipse := ws.CreateEllipse;
    view.Offset := New GxPointF.Create(1010);
End Sub Button1OnClick;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Workspace;

 
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    ws: IWxWorkspace;
    view: IWxView;
    ellipse: IWxEllipse;
    OutPoint: GxPointF = 
New GxPointFClass();
Begin
    
// Get workspace for editing
    ws := uiWorkspaceNet1.WxWorkspace;
    view := ws.Views.Item[
0];
    ellipse := ws.CreateEllipse();
    OutPoint.Create(
1010);
    view.Offset := OutPoint;
End Sub;

After executing the example a workspace view is created and its identifier, scale, size and center offset are set.

See also:

IWxView