• Articles
  • API Documentation
Search Results for

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

    Class PathBuilder

    Allow you to derivatively build shapes and paths.

    Inheritance
    Object
    PathBuilder
    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
    Assembly: SixLabors.ImageSharp.Drawing.dll
    Syntax
    public class PathBuilder

    Constructors

    | Improve this Doc View Source

    PathBuilder()

    Initializes a new instance of the PathBuilder class.

    Declaration
    public PathBuilder()
    | Improve this Doc View Source

    PathBuilder(Matrix3x2)

    Initializes a new instance of the PathBuilder class.

    Declaration
    public PathBuilder(Matrix3x2 defaultTransform)
    Parameters
    Type Name Description
    Matrix3x2 defaultTransform

    The default transform.

    Methods

    | Improve this Doc View Source

    AddBezier(PointF, PointF, PointF)

    Adds a quadratic bezier curve to the current figure joining the last point to the endPoint.

    Declaration
    public PathBuilder AddBezier(PointF startPoint, PointF controlPoint, PointF endPoint)
    Parameters
    Type Name Description
    PointF startPoint

    The start point.

    PointF controlPoint

    The control point1.

    PointF endPoint

    The end point.

    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    AddBezier(PointF, PointF, PointF, PointF)

    Adds a cubic bezier curve to the current figure joining the last point to the endPoint.

    Declaration
    public PathBuilder AddBezier(PointF startPoint, PointF controlPoint1, PointF controlPoint2, PointF endPoint)
    Parameters
    Type Name Description
    PointF startPoint

    The start point.

    PointF controlPoint1

    The control point1.

    PointF controlPoint2

    The control point2.

    PointF endPoint

    The end point.

    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    AddLine(PointF, PointF)

    Adds the line connecting the current point to the new point.

    Declaration
    public PathBuilder AddLine(PointF start, PointF end)
    Parameters
    Type Name Description
    PointF start

    The start.

    PointF end

    The end.

    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    AddLine(Single, Single, Single, Single)

    Adds the line connecting the current point to the new point.

    Declaration
    public PathBuilder AddLine(float x1, float y1, float x2, float y2)
    Parameters
    Type Name Description
    Single x1

    The x1.

    Single y1

    The y1.

    Single x2

    The x2.

    Single y2

    The y2.

    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    AddLines(PointF[])

    Adds a series of line segments connecting the current point to the new points.

    Declaration
    public PathBuilder AddLines(params PointF[] points)
    Parameters
    Type Name Description
    PointF[] points

    The points.

    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    AddLines(IEnumerable<PointF>)

    Adds a series of line segments connecting the current point to the new points.

    Declaration
    public PathBuilder AddLines(IEnumerable<PointF> points)
    Parameters
    Type Name Description
    IEnumerable<PointF> points

    The points.

    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    AddSegment(ILineSegment)

    Adds the segment.

    Declaration
    public PathBuilder AddSegment(ILineSegment segment)
    Parameters
    Type Name Description
    ILineSegment segment

    The segment.

    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    Build()

    Builds a complex polygon fromn the current working set of working operations.

    Declaration
    public IPath Build()
    Returns
    Type Description
    IPath

    The current set of operations as a complex polygon

    | Improve this Doc View Source

    Clear()

    Clears all drawn paths, Leaving any applied transforms.

    Declaration
    public void Clear()
    | Improve this Doc View Source

    CloseAllFigures()

    Closes the current figure.

    Declaration
    public PathBuilder CloseAllFigures()
    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    CloseFigure()

    Closes the current figure.

    Declaration
    public PathBuilder CloseFigure()
    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    Reset()

    Resets this instance, clearing any drawn paths and reseting any transforms.

    Declaration
    public PathBuilder Reset()
    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    ResetOrigin()

    Resets the origin to the default.

    Declaration
    public PathBuilder ResetOrigin()
    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    ResetTransform()

    Resets the translation to the default.

    Declaration
    public PathBuilder ResetTransform()
    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    SetOrigin(PointF)

    Sets the origin all subsequent point should be relative to.

    Declaration
    public PathBuilder SetOrigin(PointF origin)
    Parameters
    Type Name Description
    PointF origin

    The origin.

    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    SetTransform(Matrix3x2)

    Sets the translation to be applied to all items to follow being applied to the PathBuilder.

    Declaration
    public PathBuilder SetTransform(Matrix3x2 translation)
    Parameters
    Type Name Description
    Matrix3x2 translation

    The translation.

    Returns
    Type Description
    PathBuilder

    The PathBuilder

    | Improve this Doc View Source

    StartFigure()

    Starts a new figure but leaves the previous one open.

    Declaration
    public PathBuilder StartFigure()
    Returns
    Type Description
    PathBuilder

    The PathBuilder

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