CreateSolid(Color: IGxColor; [Width: Double = 1]);
CreateSolid(Color: Prognoz.Platform.Interop.Drawing.GxColor; Width: double);
Color. Pen color. Pen color.
Width. Width of a new pen. A new pen with the size of one pixel is created by default.
The CreateSolid constructor creates a new pen with the specified color.
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.
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: