IWxShape.Angle

Syntax

Angle: Double;

Angle: double;

Description

The Angle property determines shape rotation angle (in degrees). When positive values are set, the shape is rotated clockwise, when negative values are set, the shape is rotated counter clockwise.

Example

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

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

Sub UserProc;
Var
    MB: IMetabase;
    ws: IWxWorkspace;
    Size: IGxSizeF;
    Shape: IWxShape;
Begin
    MB := MetabaseClass.Active;
    // Get workspace
    ws := MB.ItemById("WSP").Edit As IWxWorkspace;
    ws.BeginUpdate;
    Shape := ws.Shapes.Item(1);
    Shape.Angle := 40;
    Size := New GxSizeF.Create(4378);
    Shape.Size := Size;
    ws.EndUpdate;
    // 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;
    Size: GxSizeF = 
New GxSizeFClass();
Begin
    MB := Params.Metabase;
    
// Get workspace
    ws := MB.ItemById["WSP"].Edit() As IWxWorkspace;
    ws.BeginUpdate();
    Shape := ws.Shapes.Item[
1];
    Shape.Angle := 
40;
    Size.Create(
4378);
    Shape.Size := Size;
    ws.EndUpdate();
    
// Save changes
    (ws As IMetabaseObject).Save();
End Sub;

After executing the example size and rotation angle of the second shape are changed.

See also:

IWxShape