CreateEllipse: IWxEllipse;
The CreateEllipse method creates an ellipse.
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(0, 129, 255);
Style.ShadowBrushBackColor := New GxColor.CreateRGB(255, 87, 192);
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: