IWxShape.Size

Syntax

Size: IGxSizeF;

Size: Prognoz.Platform.Interop.Drawing.GxSizeF;

Description

The Size property determines shape size.

Comments

To determine rotation angle, use the IWxShape.Angle property.

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;
    Shape: IWxShape;
    Size: IGxSizeF;
    Reg: IWxRegulargon;
Begin
    Ws := WorkspaceBox1.View.Workspace;
    Reg := Ws.CreateRegulargon;
    Reg.Id := 
"Reg1";
    Reg.PinPosition := 
New GxPointF.Create(122);
    Reg.NumberOfSides := 
5;
    Reg.Text := 
"Trapezoid";
    WS.BeginUpdate;
    Shape := WS.Shapes.Item(
0);
    Shape.Angle := 
40;
    Size := 
New GxSizeF.Create(4378);
    Shape.Size := Size;
    WS.EndUpdate;
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;
    Shape: IWxShape;
    Size: IGxSizeF;
    Reg: IWxRegulargon;
    PinPoint: GxPointF = 
New GxPointFClass();
    SSize: GxSizeF = 
New GxSizeFClass();
Begin
    Ws := workspaceBoxNet1.View.Workspace;
    Reg := Ws.CreateRegulargon();
    Reg.Id := 
"Reg1";
    PinPoint.Create(
122);
    Reg.PinPosition := PinPoint;
    Reg.NumberOfSides := 
5;
    Reg.Text := 
"Trapezoid";
    WS.BeginUpdate();
    Shape := WS.Shapes.Item[
0];
    Shape.Angle := 
40;
    SSize.Create(
4378);
    Shape.Size := SSize;
    WS.EndUpdate();
End Sub;

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

See also:

IWxShape