• 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 RectangularPolygon

    A polygon tha allows the optimized drawing of rectangles.

    Inheritance
    object
    RectangularPolygon
    Implements
    ISimplePath
    IPath
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SixLabors.ImageSharp.Drawing
    Assembly: SixLabors.ImageSharp.Drawing.dll
    Syntax
    public sealed class RectangularPolygon : ISimplePath, IPath

    Constructors

    | Edit this page View Source

    RectangularPolygon(PointF, PointF)

    Initializes a new instance of the RectangularPolygon class.

    Declaration
    public RectangularPolygon(PointF topLeft, PointF bottomRight)
    Parameters
    Type Name Description
    PointF topLeft

    The PointF which specifies the rectangles top/left point in a two-dimensional plane.

    PointF bottomRight

    The PointF which specifies the rectangles bottom/right point in a two-dimensional plane.

    | Edit this page View Source

    RectangularPolygon(PointF, SizeF)

    Initializes a new instance of the RectangularPolygon class.

    Declaration
    public RectangularPolygon(PointF point, SizeF size)
    Parameters
    Type Name Description
    PointF point

    The PointF which specifies the rectangles point in a two-dimensional plane.

    SizeF size

    The SizeF which specifies the rectangles height and width.

    | Edit this page View Source

    RectangularPolygon(RectangleF)

    Initializes a new instance of the RectangularPolygon class.

    Declaration
    public RectangularPolygon(RectangleF rectangle)
    Parameters
    Type Name Description
    RectangleF rectangle

    The rectangle.

    | Edit this page View Source

    RectangularPolygon(float, float, float, float)

    Initializes a new instance of the RectangularPolygon class.

    Declaration
    public RectangularPolygon(float x, float y, float width, float height)
    Parameters
    Type Name Description
    float x

    The horizontal position of the rectangle.

    float y

    The vertical position of the rectangle.

    float width

    The width of the rectangle.

    float height

    The height of the rectangle.

    Properties

    | Edit this page View Source

    Bottom

    Gets the y-coordinate of the bottom edge.

    Declaration
    public float Bottom { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    Bounds

    Gets the bounds enclosing the path.

    Declaration
    public RectangleF Bounds { get; }
    Property Value
    Type Description
    RectangleF
    | Edit this page View Source

    Center

    Gets the center point.

    Declaration
    public PointF Center { get; }
    Property Value
    Type Description
    PointF
    | Edit this page View Source

    Height

    Gets the height.

    Declaration
    public float Height { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    IsClosed

    Gets a value indicating whether this instance is a closed path.

    Declaration
    public bool IsClosed { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Left

    Gets the x-coordinate of the left edge.

    Declaration
    public float Left { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    Location

    Gets the location.

    Declaration
    public PointF Location { get; }
    Property Value
    Type Description
    PointF
    | Edit this page View Source

    PathType

    Gets a value indicating whether this instance is closed, open or a composite path with a mixture of open and closed figures.

    Declaration
    public PathTypes PathType { get; }
    Property Value
    Type Description
    PathTypes
    | Edit this page View Source

    Points

    Gets the points that make this up as a simple linear path.

    Declaration
    public ReadOnlyMemory<PointF> Points { get; }
    Property Value
    Type Description
    ReadOnlyMemory<PointF>
    | Edit this page View Source

    Right

    Gets the x-coordinate of the right edge.

    Declaration
    public float Right { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    Size

    Gets the size.

    Declaration
    public SizeF Size { get; }
    Property Value
    Type Description
    SizeF
    | Edit this page View Source

    Top

    Gets the y-coordinate of the top edge.

    Declaration
    public float Top { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    Width

    Gets the width.

    Declaration
    public float Width { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    X

    Gets the x-coordinate.

    Declaration
    public float X { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    Y

    Gets the y-coordinate.

    Declaration
    public float Y { get; }
    Property Value
    Type Description
    float

    Methods

    | Edit this page View Source

    AsClosedPath()

    Returns this path with all figures closed.

    Declaration
    public IPath AsClosedPath()
    Returns
    Type Description
    IPath

    A new close IPath.

    | Edit this page View Source

    Flatten()

    Converts the IPath into a simple linear path.

    Declaration
    public IEnumerable<ISimplePath> Flatten()
    Returns
    Type Description
    IEnumerable<ISimplePath>

    Returns the current IPath as simple linear path.

    | Edit this page View Source

    Transform(Matrix3x2)

    Transforms the path using the specified matrix.

    Declaration
    public IPath Transform(Matrix3x2 matrix)
    Parameters
    Type Name Description
    Matrix3x2 matrix

    The matrix.

    Returns
    Type Description
    IPath

    A new path with the matrix applied to it.

    Operators

    | Edit this page View Source

    explicit operator RectangularPolygon(Polygon)

    Converts the polygon to a rectangular polygon from its bounds.

    Declaration
    public static explicit operator RectangularPolygon(Polygon polygon)
    Parameters
    Type Name Description
    Polygon polygon

    The polygon to convert.

    Returns
    Type Description
    RectangularPolygon

    Implements

    ISimplePath
    IPath

    Extension Methods

    ClipPathExtensions.Clip(IPath, params IPath[])
    ClipPathExtensions.Clip(IPath, ShapeOptions, params IPath[])
    ClipPathExtensions.Clip(IPath, ShapeOptions, IEnumerable<IPath>)
    ClipPathExtensions.Clip(IPath, IEnumerable<IPath>)
    OutlinePathExtensions.GenerateOutline(IPath, float)
    OutlinePathExtensions.GenerateOutline(IPath, float, JointStyle, EndCapStyle)
    OutlinePathExtensions.GenerateOutline(IPath, float, ReadOnlySpan<float>)
    OutlinePathExtensions.GenerateOutline(IPath, float, ReadOnlySpan<float>, JointStyle, EndCapStyle)
    OutlinePathExtensions.GenerateOutline(IPath, float, ReadOnlySpan<float>, bool)
    OutlinePathExtensions.GenerateOutline(IPath, float, ReadOnlySpan<float>, bool, JointStyle, EndCapStyle)
    PathExtensions.ComputeLength(IPath)
    PathExtensions.Rotate(IPath, float)
    PathExtensions.RotateDegree(IPath, float)
    PathExtensions.Scale(IPath, float)
    PathExtensions.Scale(IPath, float, float)
    PathExtensions.Translate(IPath, PointF)
    PathExtensions.Translate(IPath, float, float)

    See Also

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