IWxStyle.LinePenDashPattern

Syntax

LinePenDashPattern: 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.

Example

Executing the example requires that repository contains a workspace with the IWSTYLE identifier containing shape.

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

Sub UserProc;
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    Shape: IWxShape;
    SelStyle: IWxStyle;
    s: Array[5Of Double;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    ws := mb.ItemById("IWSTYLE").Edit As IWxWorkspace;
    Shape := ws.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
    (ws As IMetabaseObject).Save;
End Sub UserProc;

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

See also:

IWxStyle