• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Drawing
      • ArcLineSegment
      • ClipPathExtensions
      • ClippingOperation
      • ComplexPolygon
      • CubicBezierLineSegment
      • EllipsePolygon
      • EmptyPath
      • EndCapStyle
      • ILineSegment
      • IPath
      • IPathCollection
      • ISimplePath
      • IntersectionRule
      • 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
      • DrawLineExtensions
      • DrawPathCollectionExtensions
      • DrawPathExtensions
      • DrawPolygonExtensions
      • DrawRectangleExtensions
      • DrawTextExtensions
      • DrawingOptions
      • DrawingOptionsDefaultsExtensions
      • 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 PathExtensions

    Convenience methods that can be applied to shapes and paths.

    Inheritance
    object
    PathExtensions
    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 static class PathExtensions

    Methods

    | Edit this page View Source

    ComputeLength(IPath)

    Calculates the approximate length of the path as though each segment were unrolled into a line.

    Declaration
    public static float ComputeLength(this IPath path)
    Parameters
    Type Name Description
    IPath path

    The path to compute the length for.

    Returns
    Type Description
    float

    The float representing the unrolled length. For closed paths, the length includes an implicit closing segment.

    | Edit this page View Source

    Rotate(IPath, float)

    Creates a path rotated by the specified radians around its center.

    Declaration
    public static IPath Rotate(this IPath path, float radians)
    Parameters
    Type Name Description
    IPath path

    The path to rotate.

    float radians

    The radians to rotate the path.

    Returns
    Type Description
    IPath

    A IPath with a rotate transform applied.

    | Edit this page View Source

    Rotate(IPathCollection, float)

    Creates a path rotated by the specified radians around its center.

    Declaration
    public static IPathCollection Rotate(this IPathCollection path, float radians)
    Parameters
    Type Name Description
    IPathCollection path

    The path to rotate.

    float radians

    The radians to rotate the path.

    Returns
    Type Description
    IPathCollection

    A IPath with a rotate transform applied.

    | Edit this page View Source

    RotateDegree(IPath, float)

    Creates a path rotated by the specified degrees around its center.

    Declaration
    public static IPath RotateDegree(this IPath shape, float degree)
    Parameters
    Type Name Description
    IPath shape

    The path to rotate.

    float degree

    The degree to rotate the path.

    Returns
    Type Description
    IPath

    A IPath with a rotate transform applied.

    | Edit this page View Source

    RotateDegree(IPathCollection, float)

    Creates a path rotated by the specified degrees around its center.

    Declaration
    public static IPathCollection RotateDegree(this IPathCollection shape, float degree)
    Parameters
    Type Name Description
    IPathCollection shape

    The path to rotate.

    float degree

    The degree to rotate the path.

    Returns
    Type Description
    IPathCollection

    A IPath with a rotate transform applied.

    | Edit this page View Source

    Scale(IPath, float)

    Creates a path translated by the supplied position

    Declaration
    public static IPath Scale(this IPath path, float scale)
    Parameters
    Type Name Description
    IPath path

    The path to translate.

    float scale

    The amount to scale along both the x and y axis.

    Returns
    Type Description
    IPath

    A IPath with a translate transform applied.

    | Edit this page View Source

    Scale(IPath, float, float)

    Creates a path translated by the supplied position

    Declaration
    public static IPath Scale(this IPath path, float scaleX, float scaleY)
    Parameters
    Type Name Description
    IPath path

    The path to translate.

    float scaleX

    The amount to scale along the X axis.

    float scaleY

    The amount to scale along the Y axis.

    Returns
    Type Description
    IPath

    A IPath with a translate transform applied.

    | Edit this page View Source

    Scale(IPathCollection, float)

    Creates a path translated by the supplied position

    Declaration
    public static IPathCollection Scale(this IPathCollection path, float scale)
    Parameters
    Type Name Description
    IPathCollection path

    The path to translate.

    float scale

    The amount to scale along both the x and y axis.

    Returns
    Type Description
    IPathCollection

    A IPath with a translate transform applied.

    | Edit this page View Source

    Scale(IPathCollection, float, float)

    Creates a path translated by the supplied position

    Declaration
    public static IPathCollection Scale(this IPathCollection path, float scaleX, float scaleY)
    Parameters
    Type Name Description
    IPathCollection path

    The path to translate.

    float scaleX

    The amount to scale along the X axis.

    float scaleY

    The amount to scale along the Y axis.

    Returns
    Type Description
    IPathCollection

    A IPath with a translate transform applied.

    | Edit this page View Source

    Translate(IPath, PointF)

    Creates a path translated by the supplied position

    Declaration
    public static IPath Translate(this IPath path, PointF position)
    Parameters
    Type Name Description
    IPath path

    The path to translate.

    PointF position

    The translation position.

    Returns
    Type Description
    IPath

    A IPath with a translate transform applied.

    | Edit this page View Source

    Translate(IPath, float, float)

    Creates a path translated by the supplied position

    Declaration
    public static IPath Translate(this IPath path, float x, float y)
    Parameters
    Type Name Description
    IPath path

    The path to translate.

    float x

    The amount to translate along the X axis.

    float y

    The amount to translate along the Y axis.

    Returns
    Type Description
    IPath

    A IPath with a translate transform applied.

    | Edit this page View Source

    Translate(IPathCollection, PointF)

    Creates a path translated by the supplied position

    Declaration
    public static IPathCollection Translate(this IPathCollection path, PointF position)
    Parameters
    Type Name Description
    IPathCollection path

    The path to translate.

    PointF position

    The translation position.

    Returns
    Type Description
    IPathCollection

    A IPath with a translate transform applied.

    | Edit this page View Source

    Translate(IPathCollection, float, float)

    Creates a path translated by the supplied position

    Declaration
    public static IPathCollection Translate(this IPathCollection path, float x, float y)
    Parameters
    Type Name Description
    IPathCollection path

    The path to translate.

    float x

    The amount to translate along the X axis.

    float y

    The amount to translate along the Y axis.

    Returns
    Type Description
    IPathCollection

    A IPath with a translate transform applied.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX