Skip to main content

ImmutablePen Class

Definition

Assembly:Avalonia.Base
Package:Avalonia

Describes how a stroke is drawn.

public class ImmutablePen

Inheritance: object -> ImmutablePen

Implements: IPen, IEquatable<IPen>

Constructors

NameDescription
ImmutablePen (2 overloads)Initializes a new instance of the Avalonia.Media.Pen class.

ImmutablePen overloads

ImmutablePen Constructor

Initializes a new instance of the Avalonia.Media.Pen class.

public ImmutablePen(Avalonia.Media.IImmutableBrush brush, double thickness, Avalonia.Media.Immutable.ImmutableDashStyle dashStyle, Avalonia.Media.PenLineCap lineCap, Avalonia.Media.PenLineJoin lineJoin, double miterLimit)
Parameters

brush Avalonia.Media.IImmutableBrush

The brush used to draw.

thickness double

The stroke thickness.

dashStyle Avalonia.Media.Immutable.ImmutableDashStyle

The dash style.

lineCap Avalonia.Media.PenLineCap

The line cap.

lineJoin Avalonia.Media.PenLineJoin

The line join.

miterLimit double

The miter limit.

ImmutablePen Constructor

Initializes a new instance of the Avalonia.Media.Pen class.

public ImmutablePen(uint color, double thickness, Avalonia.Media.Immutable.ImmutableDashStyle dashStyle, Avalonia.Media.PenLineCap lineCap, Avalonia.Media.PenLineJoin lineJoin, double miterLimit)
Parameters

color uint

The stroke color.

thickness double

The stroke thickness.

dashStyle Avalonia.Media.Immutable.ImmutableDashStyle

The dash style.

lineCap Avalonia.Media.PenLineCap

Specifies the type of graphic shape to use on both ends of a line.

lineJoin Avalonia.Media.PenLineJoin

The line join.

miterLimit double

The miter limit.

Methods

NameDescription
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.

Equals overloads

Equals Method

public bool Equals(Avalonia.Media.IPen other)
Parameters

other Avalonia.Media.IPen

Returns

bool

Equals Method

public bool Equals(object obj)
Parameters

obj object

Returns

bool

GetHashCode Method

public int GetHashCode()

Returns

int

Properties

NameDescription
BrushGets the brush used to draw the stroke.
DashStyleSpecifies the style of dashed lines drawn with a Avalonia.Media.Pen object.
LineCapSpecifies the type of graphic shape to use on both ends of a line.
LineJoinSpecifies how to join consecutive line or curve segments in a Avalonia.Media.PathFigure (subpaths) contained in a Avalonia.Media.PathGeometry object.
MiterLimitThe limit on the ratio of the miter length to half this pen's Thickness.
ThicknessGets the stroke thickness.

Brush Property

Gets the brush used to draw the stroke.

public Avalonia.Media.IBrush Brush { get; set; }

DashStyle Property

Specifies the style of dashed lines drawn with a Avalonia.Media.Pen object.

public Avalonia.Media.IDashStyle DashStyle { get; set; }

LineCap Property

Specifies the type of graphic shape to use on both ends of a line.

public Avalonia.Media.PenLineCap LineCap { get; set; }

LineJoin Property

Specifies how to join consecutive line or curve segments in a Avalonia.Media.PathFigure (subpaths) contained in a Avalonia.Media.PathGeometry object.

public Avalonia.Media.PenLineJoin LineJoin { get; set; }

MiterLimit Property

The limit on the ratio of the miter length to half this pen's Thickness.

public double MiterLimit { get; set; }

Thickness Property

Gets the stroke thickness.

public double Thickness { get; set; }