GxPen.CreateSolid

Fore Syntax

CreateSolid(Color: IGxColor; [Width: Double = 1]);

Fore.NET Syntax

CreateSolid(Color: Prognoz.Platform.Interop.Drawing.GxColor; Width: double);

Parameters

Color. Pen color. Pen color.

Width. Width of a new pen. A new pen with the size of one pixel is created by default.

Description

The CreateSolid constructor creates a new pen with the specified color.

Fore Example

Add a link to the Drawing system assembly.

Function GetPen(PenColor: GxKnownColor; PenWidth: Double): IGxPen;
Var
    OutPen: IGxPen;
Begin
    OutPen := New GxPen.CreateSolid(GxColor.FromKnownColor(PenColor), PenWidth);
    Return OutPen;
End Function GetPen;

The function returns the pen, color and width of which are passed as input parameters.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Drawing;

Function GetPen(PenColor: GxKnownColor; PenWidth: Double): GxPen;
Var
    GxColorCls: GxColorClass = New GxColorClassClass();
    OutPen: GxPen = New GxPenClass();
Begin
    OutPen.CreateSolid(GxColorCls.FromKnownColor(PenColor), PenWidth);
    Return OutPen;
End Function;

See also:

GxPen