• 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 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.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: SixLabors.ImageSharp.Drawing
    Assembly: SixLabors.ImageSharp.Drawing.dll
    Syntax
    public sealed class RectangularPolygon : ISimplePath, IPath

    Constructors

    | Improve this Doc 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 which specifies the rectangles top/left point in a two-dimensional plane.

    PointF bottomRight

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

    | Improve this Doc 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 which specifies the rectangles point in a two-dimensional plane.

    SizeF size

    The which specifies the rectangles height and width.

    | Improve this Doc 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.

    | Improve this Doc View Source

    RectangularPolygon(Single, Single, Single, Single)

    Initializes a new instance of the RectangularPolygon class.

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

    The horizontal position of the rectangle.

    Single y

    The vertical position of the rectangle.

    Single width

    The width of the rectangle.

    Single height

    The height of the rectangle.

    Properties

    | Improve this Doc View Source

    Bottom

    Gets the y-coordinate of the bottom edge.

    Declaration
    public float Bottom { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    Bounds

    Gets the bounds enclosing the path.

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

    Center

    Gets the center point.

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

    Height

    Gets the height.

    Declaration
    public float Height { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    IsClosed

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

    Declaration
    public bool IsClosed { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Left

    Gets the x-coordinate of the left edge.

    Declaration
    public float Left { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    Location

    Gets the location.

    Declaration
    public PointF Location { get; }
    Property Value
    Type Description
    PointF
    | Improve this Doc 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
    | Improve this Doc 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>
    | Improve this Doc View Source

    Right

    Gets the x-coordinate of the right edge.

    Declaration
    public float Right { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    Size

    Gets the size.

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

    Top

    Gets the y-coordinate of the top edge.

    Declaration
    public float Top { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    Width

    Gets the width.

    Declaration
    public float Width { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    X

    Gets the x-coordinate.

    Declaration
    public float X { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    Y

    Gets the y-coordinate.

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

    Methods

    | Improve this Doc View Source

    AsClosedPath()

    Returns this path with all figures closed.

    Declaration
    public IPath AsClosedPath()
    Returns
    Type Description
    IPath

    Returns the path as a closed path.

    | Improve this Doc 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.

    | Improve this Doc 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

    | Improve this Doc View Source

    Explicit(Polygon to RectangularPolygon)

    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, IEnumerable<IPath>)
    ClipPathExtensions.Clip(IPath, IPath[])
    OutlinePathExtensions.GenerateOutline(IPath, Single, Single[])
    OutlinePathExtensions.GenerateOutline(IPath, Single, ReadOnlySpan<Single>)
    OutlinePathExtensions.GenerateOutline(IPath, Single, Single[], Boolean)
    OutlinePathExtensions.GenerateOutline(IPath, Single, ReadOnlySpan<Single>, Boolean)
    OutlinePathExtensions.GenerateOutline(IPath, Single, ReadOnlySpan<Single>, Boolean, JointStyle, EndCapStyle)
    OutlinePathExtensions.GenerateOutline(IPath, Single)
    OutlinePathExtensions.GenerateOutline(IPath, Single, JointStyle, EndCapStyle)
    PathExtensions.Rotate(IPath, Single)
    PathExtensions.RotateDegree(IPath, Single)
    PathExtensions.Translate(IPath, PointF)
    PathExtensions.Translate(IPath, Single, Single)
    PathExtensions.Scale(IPath, Single, Single)
    PathExtensions.Scale(IPath, Single)

    See Also

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