IWxStyle.LinePenDashPattern

Fore Syntax

LinePenDashPattern: Array;

Fore.NET Syntax

LinePenDashPattern: System.Array;

Description

The LinePenDashPattern property determines custom line style.

Comments

Length of dashes and spaces is determined by using the array of real numbers. Use the IWxStyle.LinePenWxDashStyle property set to WxDashStyle.DashCustom for custom line style.

Fore Example

Executing the example requires that repository contains workspace with the IWStyle identifier with shape.

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

Sub UserProc;
Var
    MB: IMetabase;
    WSP: IWxWorkspace;
    Shape: IWxShape;
    SelStyle: IWxStyle;
    s: Array[5Of Double;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get workspace
    WSP := MB.ItemById("IWStyle").Edit As IWxWorkspace;
    // Get shape
    Shape := WSP.Shapes.Item(0);
    // Determine shape formatting parameters
    SelStyle := Shape.Style;
    // Determine line style
    SelStyle.LinePenWxDashStyle := WxDashStyle.DashCustom;
    // Determine line style
    s[0] := 1; s[1] := 2; s[2] := 3; s[3] := 4; s[4] := 5;
    SelStyle.LinePenDashPattern := s;
    // Determine line color and width
    SelStyle.LinePenColor := GxColor.FromName("Green");
    SelStyle.LinePenWidth := 1.5;
    // Save changes
    (Wsp As IMetabaseObject).Save;
End Sub UserProc;

After executing the example shape line type and style will be changed.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Drawing;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    WSP: IWxWorkspace;
    Shape: IWxShape;
    SelStyle: IWxStyle;
    s: Array[5Of Double;
    GxColorCls: GxColorClassClass = New GxColorClassClass();
Begin
    // Get repository
    MB := Params.Metabase;
    // Get workspace
    WSP := MB.ItemById["IWStyle"].Edit() As IWxWorkspace;
    // Get shape
    Shape := WSP.Shapes.Item[0];
    // Determine shape formatting parameters
    SelStyle := Shape.Style;
    // Determine line style
    SelStyle.LinePenWxDashStyle := WxDashStyle.wdsDashCustom;
    // Determine line style
    s[0] := 1; s[1] := 2; s[2] := 3; s[3] := 4; s[4] := 5;
    SelStyle.LinePenDashPattern := s;
    // Determine line color and width
    SelStyle.LinePenColor := GxColorCls.FromName("Green");
    SelStyle.LinePenWidth := 1.5;
    // Save changes
    (Wsp As IMetabaseObject).Save();
End Sub;

See also:

IWxStyle