IWxStyle.LinePenBeginWxCap

Syntax

LinePenBeginWxCap: WxLineCap;

LinePenBeginWxCap: Prognoz.Platform.Interop.Andy.WxLineCap;

Description

The LinePenBeginWxCap property determines type of a cap at the beginning of line.

Comments

Default value: WxLineCap.ArrowRoundedFilled.

Example

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

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

Sub UserProc;
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    Link: IWxLink;
    Style: IWxStyle;
Begin
    // Get workspace for edit
    mb := MetabaseClass.Active;
    ws := mb.ItemById("IWSTYLE").Edit As IWxWorkspace;
    ws.BeginUpdate;
    Link := ws.Shapes.Item(0As IWxLink;
    Style := Link.Style;
    Style.LinePenBeginWxCap := WxLineCap.Arrow45DegreeFilled;
    Style.LinePenCapSize := 5;
    Style.LinePenColor := GxColor.FromName("Green");
    Style.LinePenEndWxCap := WxLineCap.ArrowRoundedEmpty;
    ws.EndUpdate;
    (ws As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Drawing;

 
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    Link: IWxLink;
    Style: IWxStyle;
    SColor: GxColorClassClass = 
New GxColorClassClass();
Begin
    
// Get workspace for edit
    mb := Params.Metabase;
    ws := mb.ItemById[
"IWSTYLE"].Edit() As IWxWorkspace;
    ws.BeginUpdate();
    Link := ws.Shapes.Item[
0As IWxLink;
    Style := Link.Style;
    Style.LinePenBeginWxCap := WxLineCap.wlcArrow45DegreeFilled;
    Style.LinePenCapSize := 
5;
    Style.LinePenColor := SColor.FromName(
"Green");
    Style.LinePenEndWxCap := WxLineCap.wlcArrowRoundedEmpty;
    ws.EndUpdate();
    (ws 
As IMetabaseObject).Save();
End Sub;

After executing the example color, caps and their size are set for the line.

See also:

IWxStyle