IWxShape.LocalPinPositionCoeff

Syntax

LocalPinPositionCoeff: IGxPointF;

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

Description

The LocalPinPositionCoeff property determines rotation point offset relative to the shape size. By default, the rotation point is in the center of a shape. To place a pivot in the upper left corner of a shape, set coordinates (0,0), in the lower left corner of a shape - (1,1), in the center - (0.5,0.5).

Example

Executing the example requires that repository contains a workspace with the WSP identifier containing shape.

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

Sub UserProc;
Var
    MB: IMetabase;
    ws: IWxWorkspace;
    Shape: IWxShape;
Begin
    MB := MetabaseClass.Active;
    // Get workspace
    ws := MB.ItemById("WSP").Edit As IWxWorkspace;
    Shape := ws.Shapes.Item(0);
    Shape.LocalPinPositionCoeff := New GxPointF.Create(01);
    // Save changes
    (ws As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Drawing;

 
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    ws: IWxWorkspace;
    Shape: IWxShape;
    PinPoint: GxPointF = 
New GxPointFClass();
Begin
    MB := Params.Metabase;
    
// Get workspace
    ws := MB.ItemById["WSP"].Edit() As IWxWorkspace;
    Shape := ws.Shapes.Item[
0];
    PinPoint.Create(
01);
    Shape.LocalPinPositionCoeff := PinPoint;
    
// Save changes
    (ws As IMetabaseObject).Save();
End Sub;

After executing the example the point of rotation is located in the upper left corner.

See also:

IWxShape