// -----------------------------------------------------------------------
//
// Copyright 2013 MIT Licence. See licence.md for more information.
//
// -----------------------------------------------------------------------
namespace Perspex.Media
{
using System.Collections.Generic;
///
/// Describes how a stroke is drawn.
///
public class Pen
{
///
/// Initializes a new instance of the class.
///
/// The brush used to draw.
/// The stroke thickness.
/// The length of alternating dashes and gaps.
public Pen(Brush brush, double thickness, IReadOnlyList dashArray = null)
{
this.Brush = brush;
this.Thickness = thickness;
this.DashArray = dashArray;
}
///
/// Initializes a new instance of the class.
///
/// The stroke color.
/// The stroke thickness.
/// The length of alternating dashes and gaps.
public Pen(uint color, double thickness, IReadOnlyList dashArray = null)
{
this.Brush = new SolidColorBrush(color);
this.Thickness = thickness;
this.DashArray = dashArray;
}
///
/// Gets the brush used to draw the stroke.
///
public Brush Brush { get; }
///
/// Gets the length of alternating dashes and gaps.
///
public IReadOnlyList DashArray { get; }
///
/// Gets the stroke thickness.
///
public double Thickness { get; }
}
}