• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Drawing
      • ArcLineSegment
      • ClipPathExtensions
      • ComplexPolygon
      • CubicBezierLineSegment
      • EllipsePolygon
      • EmptyPath
      • EndCapStyle
      • ILineSegment
      • IntersectionRule
      • IPath
      • IPathCollection
      • ISimplePath
      • JointStyle
      • LinearLineSegment
      • OutlinePathExtensions
      • Path
      • PathBuilder
      • PathCollection
      • PathExtensions
      • PathTypes
      • Polygon
      • RectangularPolygon
      • RegularPolygon
      • SegmentInfo
      • Star
      • TextBuilder
    • SixLabors.ImageSharp.Drawing.PolygonClipper
      • ClippablePath
      • ClipperException
      • ClippingType
    • SixLabors.ImageSharp.Drawing.Processing
      • BrushApplicator<TPixel>
      • Brushes
      • ClearExtensions
      • ClearPathExtensions
      • ClearRectangleExtensions
      • ClipPathExtensions
      • ColorStop
      • DrawBezierExtensions
      • DrawingOptions
      • DrawingOptionsDefaultsExtensions
      • DrawLineExtensions
      • DrawPathCollectionExtensions
      • DrawPathExtensions
      • DrawPolygonExtensions
      • DrawRectangleExtensions
      • DrawTextExtensions
      • EllipticGradientBrush
      • FillExtensions
      • FillPathBuilderExtensions
      • FillPathCollectionExtensions
      • FillPathExtensions
      • FillPolygonExtensions
      • FillRectangleExtensions
      • GradientBrush
      • GradientRepetitionMode
      • IBrush
      • ImageBrush
      • IPen
      • LinearGradientBrush
      • PathGradientBrush
      • PatternBrush
      • Pen
      • Pens
      • RadialGradientBrush
      • RecolorBrush
      • ShapeGraphicOptionsDefaultsExtensions
      • ShapeOptions
      • SolidBrush
    • SixLabors.ImageSharp.Drawing.Processing.Processors.Drawing
      • ClipPathProcessor
      • DrawPathProcessor
      • FillPathProcessor
      • FillProcessor
    • SixLabors.ImageSharp.Drawing.Processing.Processors.Text
      • DrawTextProcessor

    Class Pen

    Provides a pen that can apply a pattern to a line with a set brush and thickness

    Inheritance
    Object
    Pen
    Implements
    IPen
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: SixLabors.ImageSharp.Drawing.Processing
    Assembly: SixLabors.ImageSharp.Drawing.dll
    Syntax
    public class Pen : IPen
    Remarks

    The pattern will be in to the form of new float[]{ 1f, 2f, 0.5f} this will be converted into a pattern that is 3.5 times longer that the width with 3 sections section 1 will be width long (making a square) and will be filled by the brush section 2 will be width * 2 long and will be empty section 3 will be width/2 long and will be filled the pattern will immediately repeat without gap.

    Constructors

    | Improve this Doc View Source

    Pen(Color, Single)

    Initializes a new instance of the Pen class.

    Declaration
    public Pen(Color color, float width)
    Parameters
    Type Name Description
    Color color

    The color.

    Single width

    The width.

    | Improve this Doc View Source

    Pen(Color, Single, Single[])

    Initializes a new instance of the Pen class.

    Declaration
    public Pen(Color color, float width, float[] pattern)
    Parameters
    Type Name Description
    Color color

    The color.

    Single width

    The width.

    Single[] pattern

    The pattern.

    | Improve this Doc View Source

    Pen(IBrush, Single)

    Initializes a new instance of the Pen class.

    Declaration
    public Pen(IBrush brush, float width)
    Parameters
    Type Name Description
    IBrush brush

    The brush.

    Single width

    The width.

    | Improve this Doc View Source

    Pen(IBrush, Single, Single[])

    Initializes a new instance of the Pen class.

    Declaration
    public Pen(IBrush brush, float width, float[] pattern)
    Parameters
    Type Name Description
    IBrush brush

    The brush.

    Single width

    The width.

    Single[] pattern

    The pattern.

    Properties

    | Improve this Doc View Source

    EndCapStyle

    Gets or sets the stroke endcap style

    Declaration
    public EndCapStyle EndCapStyle { get; set; }
    Property Value
    Type Description
    EndCapStyle
    | Improve this Doc View Source

    JointStyle

    Gets or sets the stroke joint style

    Declaration
    public JointStyle JointStyle { get; set; }
    Property Value
    Type Description
    JointStyle
    | Improve this Doc View Source

    StrokeFill

    Gets the stroke fill.

    Declaration
    public IBrush StrokeFill { get; }
    Property Value
    Type Description
    IBrush
    | Improve this Doc View Source

    StrokePattern

    Gets the stoke pattern.

    Declaration
    public ReadOnlySpan<float> StrokePattern { get; }
    Property Value
    Type Description
    ReadOnlySpan<Single>
    | Improve this Doc View Source

    StrokeWidth

    Gets the width to apply to the stroke

    Declaration
    public float StrokeWidth { get; }
    Property Value
    Type Description
    Single

    Implements

    IPen
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX