WxWorkspace.CreateEllipse

Syntax

CreateEllipse: IWxEllipse;

Description

The CreateEllipse method creates an ellipse.

Example

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

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

Sub Userproc;
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Ellipse: IWxEllipse;
    Style: IWxStyle;
Begin
    // Get workspace
    mb := MetabaseClass.Active;
    wsp := mb.ItemById("WSP").Edit As IWxWorkspace;
    // Get shape
    Ellipse := wsp.CreateEllipse;
    Ellipse.Id := "Ellipse1";
    Ellipse.PinPosition := New GxPointF.Create(12, -10);
    Style := wsp.CreateStyle;
    Style.BackgroundBrushForeColor := GxColor.FromName("Red");
    Style.ShadowBrushForeColor := New GxColor.CreateRGB(0129255);
    Style.ShadowBrushBackColor := New GxColor.CreateRGB(25587192);
    Style.ShadowBrushPattern := GxBrushPattern.Diagonals;
    Ellipse.Style := Style;
    //Save changes
    (Wsp As IMetabaseObject).Save;
End Sub Userproc;

After executing the example an ellipse with the defined formatting parameters is created.

See also:

IWxWorkspace