Skip to content

Pen constructor (1 of 2)

Creates a pen that strokes with brush.

public Pen(Brush brush, double thickness = 1m, StrokeStyle? strokeStyle = default)
parameter description
brush The brush to use for the stroke.
thickness Stroke thickness in device-independent pixels.
strokeStyle Stroke attributes, or null for Default (flat caps, miter join, miter limit 10).

Creates a pen that strokes with a solid color.

public Pen(Color color, double thickness = 1m, StrokeStyle? strokeStyle = default)