• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Drawing
      • ArcLineSegment
      • ClipPathExtensions
      • ClippingOperation
      • 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.Processing
      • Brush
      • 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
      • ImageBrush
      • LinearGradientBrush
      • PathGradientBrush
      • PatternBrush
      • PatternPen
      • Pen
      • PenOptions
      • Pens
      • RadialGradientBrush
      • RecolorBrush
      • RichTextOptions
      • RichTextRun
      • ShapeGraphicOptionsDefaultsExtensions
      • ShapeOptions
      • SolidBrush
      • SolidPen
    • SixLabors.ImageSharp.Drawing.Processing.Processors.Drawing
      • ClipPathProcessor
      • DrawPathProcessor
      • FillPathProcessor
      • FillProcessor
    • SixLabors.ImageSharp.Drawing.Processing.Processors.Text
      • DrawTextProcessor
    • SixLabors.ImageSharp.Drawing.Shapes.PolygonClipper
      • ClipperException
      • ClippingType

    Class PatternPen

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

    Inheritance
    Object
    Pen
    PatternPen
    Inherited Members
    Pen.StrokeFill
    Pen.StrokeWidth
    Pen.StrokePattern
    Pen.JointStyle
    Pen.EndCapStyle
    Pen.GeneratePath(IPath)
    Pen.Equals(Nullable<Object>)
    Pen.GetHashCode()
    Namespace: SixLabors.ImageSharp.Drawing.Processing
    Assembly: SixLabors.ImageSharp.Drawing.dll
    Syntax
    public class PatternPen : Pen
    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

    PatternPen(Color, Single, Single[])

    Initializes a new instance of the PatternPen class.

    Declaration
    public PatternPen(Color color, float strokeWidth, float[] strokePattern)
    Parameters
    Type Name Description
    Color color

    The color.

    Single strokeWidth

    The stroke width in px units.

    Single[] strokePattern

    The stroke pattern.

    | Improve this Doc View Source

    PatternPen(Color, Single[])

    Initializes a new instance of the PatternPen class.

    Declaration
    public PatternPen(Color color, float[] strokePattern)
    Parameters
    Type Name Description
    Color color

    The color.

    Single[] strokePattern

    The stroke pattern.

    | Improve this Doc View Source

    PatternPen(Brush, Single, Single[])

    Initializes a new instance of the PatternPen class.

    Declaration
    public PatternPen(Brush strokeFill, float strokeWidth, float[] strokePattern)
    Parameters
    Type Name Description
    Brush strokeFill

    The brush used to fill the stroke outline.

    Single strokeWidth

    The stroke width in px units.

    Single[] strokePattern

    The stroke pattern.

    | Improve this Doc View Source

    PatternPen(PenOptions)

    Initializes a new instance of the PatternPen class.

    Declaration
    public PatternPen(PenOptions options)
    Parameters
    Type Name Description
    PenOptions options

    The pen options.

    Methods

    | Improve this Doc View Source

    Equals(Pen)

    Declaration
    public override bool Equals(Pen other)
    Parameters
    Type Name Description
    Pen other
    Returns
    Type Description
    Boolean
    Overrides
    Pen.Equals(Pen)
    | Improve this Doc View Source

    GeneratePath(IPath, Single)

    Applies the styling from the pen to a path and generate a new path with the final vector.

    Declaration
    public override IPath GeneratePath(IPath path, float strokeWidth)
    Parameters
    Type Name Description
    IPath path

    The source path

    Single strokeWidth

    The stroke width in px units.

    Returns
    Type Description
    IPath

    The IPath with the pen styling applied.

    Overrides
    Pen.GeneratePath(IPath, Single)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX