Table of Contents

Class UniversalPen

Namespace
Utils.Common
Assembly
Utils.Common.dll

The cross-platform replacement of System.Drawing.Pen in ATAS X builds: a plain description of a line style that owns no native resources and needs no disposal. Indicators built for ATAS X use it in place of Pen, and the pen references of indicators compiled for the classic platform are retargeted to it when they are loaded on ATAS X. The classic platform build uses System.Drawing.Pen instead. Not thread-safe.

Added in ATAS 8.0.15.

public sealed class UniversalPen
Inheritance
object
UniversalPen
Extension Methods

Constructors

UniversalPen(Color)

Creates a solid pen of the given color. Unlike System.Drawing.Pen(Color), which sets the width to 1, it leaves Width at 0.

public UniversalPen(Color color)

Parameters

color Color

The color of the line.

UniversalPen(Color, float)

Creates a solid pen of the given color and width.

public UniversalPen(Color color, float width)

Parameters

color Color

The color of the line.

width float

The width of the line.

Properties

Color

The color of the line.

public Color Color { get; set; }

Property Value

Color

CustomEndCap

The arrow drawn at the end of the line; used only when EndCap is System.Drawing.Drawing2D.LineCap.Custom. Null for none.

public AdjustableArrowCap? CustomEndCap { get; set; }

Property Value

AdjustableArrowCap

CustomStartCap

The arrow drawn at the start of the line; used only when StartCap is System.Drawing.Drawing2D.LineCap.Custom. Null for none.

public AdjustableArrowCap? CustomStartCap { get; set; }

Property Value

AdjustableArrowCap

DashPattern

The lengths of the alternating dashes and spaces, as in System.Drawing.Pen.DashPattern; used only when DashStyle is System.Drawing.Drawing2D.DashStyle.Custom. Null when not set.

public float[]? DashPattern { get; set; }

Property Value

float[]

DashStyle

The dash style of the line; System.Drawing.Drawing2D.DashStyle.Solid by default.

public DashStyle DashStyle { get; set; }

Property Value

DashStyle

EndCap

The cap at the end of the line; System.Drawing.Drawing2D.LineCap.Flat by default. The chart renderer uses it only to enable CustomEndCap with System.Drawing.Drawing2D.LineCap.Custom.

public LineCap EndCap { get; set; }

Property Value

LineCap

LineJoin

The join style of the line segments; System.Drawing.Drawing2D.LineJoin.Miter by default. Not passed to the chart renderer.

public LineJoin LineJoin { get; set; }

Property Value

LineJoin

MiterLimit

The limit of the thickness of a mitered join. Not passed to the chart renderer.

public int MiterLimit { get; set; }

Property Value

int

StartCap

The cap at the start of the line; System.Drawing.Drawing2D.LineCap.Flat by default. The chart renderer uses it only to enable CustomStartCap with System.Drawing.Drawing2D.LineCap.Custom.

public LineCap StartCap { get; set; }

Property Value

LineCap

Width

The width of the line, passed unchanged to the chart renderer. 0 when the pen is created without a width.

public float Width { get; set; }

Property Value

float