示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Pen"/> class.
 /// </summary>
 /// <param name="color">The stroke color.</param>
 /// <param name="thickness">The stroke thickness.</param>
 /// <param name="dashStyle">The dash style.</param>
 /// <param name="lineCap">Specifies the type of graphic shape to use on both ends of a line.</param>
 /// <param name="lineJoin">The line join.</param>
 /// <param name="miterLimit">The miter limit.</param>
 public ImmutablePen(
     uint color,
     double thickness             = 1.0,
     ImmutableDashStyle dashStyle = null,
     PenLineCap lineCap           = PenLineCap.Flat,
     PenLineJoin lineJoin         = PenLineJoin.Miter,
     double miterLimit            = 10.0) : this(new ImmutableSolidColorBrush(color), thickness, dashStyle, lineCap, lineJoin, miterLimit)
 {
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Pen"/> class.
 /// </summary>
 /// <param name="brush">The brush used to draw.</param>
 /// <param name="thickness">The stroke thickness.</param>
 /// <param name="dashStyle">The dash style.</param>
 /// <param name="lineCap">The line cap.</param>
 /// <param name="lineJoin">The line join.</param>
 /// <param name="miterLimit">The miter limit.</param>
 public ImmutablePen(
     IBrush brush,
     double thickness             = 1.0,
     ImmutableDashStyle dashStyle = null,
     PenLineCap lineCap           = PenLineCap.Flat,
     PenLineJoin lineJoin         = PenLineJoin.Miter,
     double miterLimit            = 10.0)
 {
     Brush      = brush;
     Thickness  = thickness;
     LineCap    = lineCap;
     LineJoin   = lineJoin;
     MiterLimit = miterLimit;
     DashStyle  = dashStyle;
 }