GxPen.CreateSolid

Syntax

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

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.

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.

See also:

GxPen