• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp
      • Color
      • ColorMatrix
      • Configuration
      • DenseMatrix<T>
      • GeometryUtilities
      • GraphicOptionsDefaultsExtensions
      • GraphicsOptions
      • IConfigurationModule
      • IDeepCloneable
      • IDeepCloneable<T>
      • IImage
      • IImageInfo
      • Image
      • Image<TPixel>
      • ImageExtensions
      • ImageFormatException
      • ImageFrame
      • ImageFrame<TPixel>
      • ImageFrameCollection
      • ImageFrameCollection<TPixel>
      • ImageInfoExtensions
      • ImageProcessingException
      • IndexedImageFrame<TPixel>
      • InvalidImageContentException
      • Matrix3x2Extensions
      • MetadataExtensions
      • Number
      • Point
      • PointF
      • Rational
      • ReadOrigin
      • Rectangle
      • RectangleF
      • SignedRational
      • Size
      • SizeF
      • UnknownImageFormatException
    • SixLabors.ImageSharp.Advanced
      • AdvancedImageExtensions
      • IImageVisitor
      • IImageVisitorAsync
      • IRowIntervalOperation
      • IRowIntervalOperation<TBuffer>
      • IRowOperation
      • IRowOperation<TBuffer>
      • ParallelExecutionSettings
      • ParallelRowIterator
    • SixLabors.ImageSharp.ColorSpaces
      • CieLab
      • CieLch
      • CieLchuv
      • CieLuv
      • CieXyy
      • CieXyz
      • Cmyk
      • Hsl
      • Hsv
      • HunterLab
      • Illuminants
      • LinearRgb
      • Lms
      • Rgb
      • RgbWorkingSpaces
      • YCbCr
    • SixLabors.ImageSharp.ColorSpaces.Companding
      • GammaCompanding
      • LCompanding
      • Rec2020Companding
      • Rec709Companding
      • SRgbCompanding
    • SixLabors.ImageSharp.ColorSpaces.Conversion
      • CieXyChromaticityCoordinates
      • ColorSpaceConverter
      • ColorSpaceConverterOptions
      • GammaWorkingSpace
      • IChromaticAdaptation
      • LmsAdaptationMatrix
      • LWorkingSpace
      • Rec2020WorkingSpace
      • Rec709WorkingSpace
      • RgbPrimariesChromaticityCoordinates
      • RgbWorkingSpace
      • SRgbWorkingSpace
      • VonKriesChromaticAdaptation
    • SixLabors.ImageSharp.Formats
      • IImageDecoder
      • IImageEncoder
      • IImageFormat
      • IImageFormat<TFormatMetadata, TFormatFrameMetadata>
      • IImageFormat<TFormatMetadata>
      • IImageFormatDetector
      • IImageInfoDetector
      • ImageFormatManager
      • PixelTypeInfo
    • SixLabors.ImageSharp.Formats.Bmp
      • BmpBitsPerPixel
      • BmpConfigurationModule
      • BmpDecoder
      • BmpEncoder
      • BmpFileMarkerType
      • BmpFormat
      • BmpImageFormatDetector
      • BmpInfoHeaderType
      • BmpMetadata
      • RleSkippedPixelHandling
    • SixLabors.ImageSharp.Formats.Gif
      • GifColorTableMode
      • GifConfigurationModule
      • GifDecoder
      • GifDisposalMethod
      • GifEncoder
      • GifFormat
      • GifFrameMetadata
      • GifImageFormatDetector
      • GifMetadata
      • IGifExtension
    • SixLabors.ImageSharp.Formats.Jpeg
      • JpegConfigurationModule
      • JpegDecoder
      • JpegEncoder
      • JpegFormat
      • JpegImageFormatDetector
      • JpegMetadata
      • JpegSubsample
    • SixLabors.ImageSharp.Formats.Png
      • PngBitDepth
      • PngChunkFilter
      • PngColorType
      • PngCompressionLevel
      • PngConfigurationModule
      • PngDecoder
      • PngEncoder
      • PngFilterMethod
      • PngFormat
      • PngImageFormatDetector
      • PngInterlaceMode
      • PngMetadata
      • PngTextData
      • PngTransparentColorMode
    • SixLabors.ImageSharp.Formats.Tga
      • TgaBitsPerPixel
      • TgaCompression
      • TgaConfigurationModule
      • TgaDecoder
      • TgaEncoder
      • TgaFormat
      • TgaImageFormatDetector
      • TgaImageType
      • TgaImageTypeExtensions
      • TgaMetadata
    • SixLabors.ImageSharp.Memory
      • AllocationOptions
      • ArrayPoolMemoryAllocator
      • Buffer2D<T>
      • Buffer2DExtensions
      • Buffer2DRegion<T>
      • IManagedByteBuffer
      • IMemoryGroup<T>
      • InvalidMemoryOperationException
      • MemoryAllocator
      • MemoryAllocatorExtensions
      • RowInterval
      • SimpleGcMemoryAllocator
    • SixLabors.ImageSharp.Metadata
      • FrameDecodingMode
      • ImageFrameMetadata
      • ImageMetadata
      • PixelResolutionUnit
    • SixLabors.ImageSharp.Metadata.Profiles.Exif
      • ExifDataType
      • ExifParts
      • ExifProfile
      • ExifTag
      • ExifTag<TValueType>
      • IExifValue
      • IExifValue<TValueType>
    • SixLabors.ImageSharp.Metadata.Profiles.Icc
      • IccColorSpaceType
      • IccDeviceAttribute
      • IccPrimaryPlatformType
      • IccProfile
      • IccProfileClass
      • IccProfileFlag
      • IccProfileHeader
      • IccProfileId
      • IccProfileTag
      • IccRenderingIntent
      • IccTagDataEntry
      • IccTypeSignature
      • IccVersion
      • InvalidIccProfileException
    • SixLabors.ImageSharp.Metadata.Profiles.Iptc
      • IptcProfile
      • IptcTag
      • IptcTagExtensions
      • IptcValue
    • SixLabors.ImageSharp.PixelFormats
      • A8
      • Argb32
      • Bgr24
      • Bgr565
      • Bgra32
      • Bgra4444
      • Bgra5551
      • Byte4
      • HalfSingle
      • HalfVector2
      • HalfVector4
      • IPackedVector<TPacked>
      • IPixel
      • IPixel<TSelf>
      • L16
      • L8
      • La16
      • La32
      • NormalizedByte2
      • NormalizedByte4
      • NormalizedShort2
      • NormalizedShort4
      • PixelAlphaCompositionMode
      • PixelAlphaRepresentation
      • PixelBlender<TPixel>
      • PixelColorBlendingMode
      • PixelConversionModifiers
      • PixelOperations<TPixel>
      • Rg32
      • Rgb24
      • Rgb48
      • Rgba1010102
      • Rgba32
      • Rgba64
      • RgbaVector
      • Short2
      • Short4
    • SixLabors.ImageSharp.Processing
      • AdaptiveThresholdExtensions
      • AffineTransformBuilder
      • AnchorPositionMode
      • AutoOrientExtensions
      • BackgroundColorExtensions
      • BinaryDitherExtensions
      • BinaryThresholdExtensions
      • BinaryThresholdMode
      • BlackWhiteExtensions
      • BokehBlurExtensions
      • BoxBlurExtensions
      • BrightnessExtensions
      • ColorBlindnessExtensions
      • ColorBlindnessMode
      • ContrastExtensions
      • CropExtensions
      • DetectEdgesExtensions
      • DitherExtensions
      • DrawImageExtensions
      • EntropyCropExtensions
      • FilterExtensions
      • FlipExtensions
      • FlipMode
      • GaussianBlurExtensions
      • GaussianSharpenExtensions
      • GlowExtensions
      • GrayscaleExtensions
      • GrayscaleMode
      • HistogramEqualizationExtensions
      • HueExtensions
      • IImageProcessingContext
      • InvertExtensions
      • KnownDitherings
      • KnownEdgeDetectorKernels
      • KnownFilterMatrices
      • KnownQuantizers
      • KnownResamplers
      • KodachromeExtensions
      • LightnessExtensions
      • LomographExtensions
      • OilPaintExtensions
      • OpacityExtensions
      • PadExtensions
      • PixelateExtensions
      • PixelRowDelegateExtensions
      • PixelRowOperation
      • PixelRowOperation<T>
      • PolaroidExtensions
      • ProcessingExtensions
      • ProjectiveTransformBuilder
      • QuantizeExtensions
      • ResizeExtensions
      • ResizeMode
      • ResizeOptions
      • RotateExtensions
      • RotateFlipExtensions
      • RotateMode
      • SaturateExtensions
      • SepiaExtensions
      • SkewExtensions
      • TaperCorner
      • TaperSide
      • TransformExtensions
      • VignetteExtensions
    • SixLabors.ImageSharp.Processing.Extensions.Transforms
      • SwizzleExtensions
    • SixLabors.ImageSharp.Processing.Processors
      • CloningImageProcessor
      • CloningImageProcessor<TPixel>
      • ICloningImageProcessor
      • ICloningImageProcessor<TPixel>
      • IImageProcessor
      • IImageProcessor<TPixel>
      • ImageProcessor<TPixel>
    • SixLabors.ImageSharp.Processing.Processors.Binarization
      • AdaptiveThresholdProcessor
      • BinaryThresholdProcessor
    • SixLabors.ImageSharp.Processing.Processors.Convolution
      • BokehBlurProcessor
      • BoxBlurProcessor
      • EdgeDetector2DKernel
      • EdgeDetector2DProcessor
      • EdgeDetectorCompassKernel
      • EdgeDetectorCompassProcessor
      • EdgeDetectorKernel
      • EdgeDetectorProcessor
      • GaussianBlurProcessor
      • GaussianSharpenProcessor
    • SixLabors.ImageSharp.Processing.Processors.Dithering
      • ErrorDither
      • IDither
      • IPaletteDitherImageProcessor<TPixel>
      • OrderedDither
      • PaletteDitherProcessor
    • SixLabors.ImageSharp.Processing.Processors.Drawing
      • DrawImageProcessor
    • SixLabors.ImageSharp.Processing.Processors.Effects
      • IPixelRowDelegate
      • OilPaintingProcessor
      • PixelateProcessor
    • SixLabors.ImageSharp.Processing.Processors.Filters
      • AchromatomalyProcessor
      • AchromatopsiaProcessor
      • BlackWhiteProcessor
      • BrightnessProcessor
      • ContrastProcessor
      • DeuteranomalyProcessor
      • DeuteranopiaProcessor
      • FilterProcessor
      • GrayscaleBt601Processor
      • GrayscaleBt709Processor
      • HueProcessor
      • InvertProcessor
      • KodachromeProcessor
      • LightnessProcessor
      • LomographProcessor
      • OpacityProcessor
      • PolaroidProcessor
      • ProtanomalyProcessor
      • ProtanopiaProcessor
      • SaturateProcessor
      • SepiaProcessor
      • TritanomalyProcessor
      • TritanopiaProcessor
    • SixLabors.ImageSharp.Processing.Processors.Normalization
      • AdaptiveHistogramEqualizationProcessor
      • AdaptiveHistogramEqualizationSlidingWindowProcessor
      • GlobalHistogramEqualizationProcessor
      • HistogramEqualizationMethod
      • HistogramEqualizationOptions
      • HistogramEqualizationProcessor
    • SixLabors.ImageSharp.Processing.Processors.Overlays
      • BackgroundColorProcessor
      • GlowProcessor
      • VignetteProcessor
    • SixLabors.ImageSharp.Processing.Processors.Quantization
      • DefaultPixelSamplingStrategy
      • ExtensivePixelSamplingStrategy
      • IPixelSamplingStrategy
      • IQuantizer
      • IQuantizer<TPixel>
      • OctreeQuantizer
      • OctreeQuantizer<TPixel>
      • PaletteQuantizer
      • QuantizeProcessor
      • QuantizerConstants
      • QuantizerOptions
      • QuantizerUtilities
      • WebSafePaletteQuantizer
      • WernerPaletteQuantizer
      • WuQuantizer
    • SixLabors.ImageSharp.Processing.Processors.Transforms
      • AffineTransformProcessor
      • AutoOrientProcessor
      • BicubicResampler
      • BoxResampler
      • CropProcessor
      • CubicResampler
      • DegenerateTransformException
      • EntropyCropProcessor
      • FlipProcessor
      • IResampler
      • IResamplingTransformImageProcessor<TPixel>
      • ISwizzler
      • LanczosResampler
      • NearestNeighborResampler
      • ProjectiveTransformProcessor
      • ResizeProcessor
      • RotateProcessor
      • SkewProcessor
      • SwizzleProcessor<TSwizzler>
      • TriangleResampler
      • WelchResampler

    Struct RectangleF

    Stores a set of four single precision floating points that represent the location and size of a rectangle.

    Implements
    IEquatable<RectangleF>
    Inherited Members
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    Namespace: SixLabors.ImageSharp
    Assembly: SixLabors.ImageSharp.dll
    Syntax
    public struct RectangleF : IEquatable<RectangleF>
    Remarks

    This struct is fully mutable. This is done (against the guidelines) for the sake of performance, as it avoids the need to create new values for modification operations.

    Constructors

    | Improve this Doc View Source

    RectangleF(PointF, SizeF)

    Initializes a new instance of the RectangleF struct.

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

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

    SizeF size

    The SixLabors.ImageSharp.RectangleF.Size which specifies the rectangles height and width.

    | Improve this Doc View Source

    RectangleF(Single, Single, Single, Single)

    Initializes a new instance of the RectangleF struct.

    Declaration
    public RectangleF(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.

    Fields

    | Improve this Doc View Source

    Empty

    Represents a RectangleF that has X, Y, Width, and Height values set to zero.

    Declaration
    public static readonly RectangleF Empty
    Field Value
    Type Description
    RectangleF

    Properties

    | Improve this Doc View Source

    Bottom

    Gets the y-coordinate of the bottom edge of this RectangleF.

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

    Height

    Gets or sets the height of this RectangleF.

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

    Left

    Gets the x-coordinate of the left edge of this RectangleF.

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

    Right

    Gets the x-coordinate of the right edge of this RectangleF.

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

    Top

    Gets the y-coordinate of the top edge of this RectangleF.

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

    Width

    Gets or sets the width of this RectangleF.

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

    X

    Gets or sets the x-coordinate of this RectangleF.

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

    Y

    Gets or sets the y-coordinate of this RectangleF.

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

    Methods

    | Improve this Doc View Source

    Center(RectangleF)

    Returns the center point of the given RectangleF.

    Declaration
    public static PointF Center(RectangleF rectangle)
    Parameters
    Type Name Description
    RectangleF rectangle

    The rectangle.

    Returns
    Type Description
    PointF

    The Point.

    | Improve this Doc View Source

    Contains(PointF)

    Determines if the specified point is contained within the rectangular region defined by this RectangleF .

    Declaration
    public bool Contains(PointF point)
    Parameters
    Type Name Description
    PointF point

    The point.

    Returns
    Type Description
    Boolean

    The Boolean.

    | Improve this Doc View Source

    Contains(RectangleF)

    Determines if the rectangular region represented by rectangle is entirely contained within the rectangular region represented by this RectangleF .

    Declaration
    public bool Contains(RectangleF rectangle)
    Parameters
    Type Name Description
    RectangleF rectangle

    The rectangle.

    Returns
    Type Description
    Boolean

    The Boolean.

    | Improve this Doc View Source

    Contains(Single, Single)

    Determines if the specfied point is contained within the rectangular region defined by this RectangleF.

    Declaration
    public bool Contains(float x, float y)
    Parameters
    Type Name Description
    Single x

    The x-coordinate of the given point.

    Single y

    The y-coordinate of the given point.

    Returns
    Type Description
    Boolean

    The Boolean.

    | Improve this Doc View Source

    Deconstruct(out Single, out Single, out Single, out Single)

    Deconstructs this rectangle into four floats.

    Declaration
    public void Deconstruct(out float x, out float y, out float width, out float height)
    Parameters
    Type Name Description
    Single x

    The out value for X.

    Single y

    The out value for Y.

    Single width

    The out value for the width.

    Single height

    The out value for the height.

    | Improve this Doc View Source

    Equals(RectangleF)

    Declaration
    public bool Equals(RectangleF other)
    Parameters
    Type Name Description
    RectangleF other
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)
    | Improve this Doc View Source

    FromLTRB(Single, Single, Single, Single)

    Creates a new RectangleF with the specified location and size.

    Declaration
    public static RectangleF FromLTRB(float left, float top, float right, float bottom)
    Parameters
    Type Name Description
    Single left

    The left coordinate of the rectangle.

    Single top

    The top coordinate of the rectangle.

    Single right

    The right coordinate of the rectangle.

    Single bottom

    The bottom coordinate of the rectangle.

    Returns
    Type Description
    RectangleF

    The RectangleF.

    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()
    | Improve this Doc View Source

    Inflate(RectangleF, Single, Single)

    Creates a RectangleF that is inflated by the specified amount.

    Declaration
    public static RectangleF Inflate(RectangleF rectangle, float x, float y)
    Parameters
    Type Name Description
    RectangleF rectangle

    The rectangle.

    Single x

    The amount to inflate the width by.

    Single y

    The amount to inflate the height by.

    Returns
    Type Description
    RectangleF

    A new RectangleF.

    | Improve this Doc View Source

    Inflate(SizeF)

    Inflates this RectangleF by the specified amount.

    Declaration
    public void Inflate(SizeF size)
    Parameters
    Type Name Description
    SizeF size

    The size.

    | Improve this Doc View Source

    Inflate(Single, Single)

    Inflates this RectangleF by the specified amount.

    Declaration
    public void Inflate(float width, float height)
    Parameters
    Type Name Description
    Single width

    The width.

    Single height

    The height.

    | Improve this Doc View Source

    Intersect(RectangleF)

    Creates a RectangleF that represents the intersection between this RectangleF and the rectangle.

    Declaration
    public void Intersect(RectangleF rectangle)
    Parameters
    Type Name Description
    RectangleF rectangle

    The rectangle.

    | Improve this Doc View Source

    Intersect(RectangleF, RectangleF)

    Creates a rectangle that represents the intersection between a and b. If there is no intersection, an empty rectangle is returned.

    Declaration
    public static RectangleF Intersect(RectangleF a, RectangleF b)
    Parameters
    Type Name Description
    RectangleF a

    The first rectangle.

    RectangleF b

    The second rectangle.

    Returns
    Type Description
    RectangleF

    The RectangleF.

    | Improve this Doc View Source

    IntersectsWith(RectangleF)

    Determines if the specfied RectangleF intersects the rectangular region defined by this RectangleF.

    Declaration
    public bool IntersectsWith(RectangleF rectangle)
    Parameters
    Type Name Description
    RectangleF rectangle

    The other Rectange.

    Returns
    Type Description
    Boolean

    The Boolean.

    | Improve this Doc View Source

    Offset(PointF)

    Adjusts the location of this rectangle by the specified amount.

    Declaration
    public void Offset(PointF point)
    Parameters
    Type Name Description
    PointF point

    The point.

    | Improve this Doc View Source

    Offset(Single, Single)

    Adjusts the location of this rectangle by the specified amount.

    Declaration
    public void Offset(float dx, float dy)
    Parameters
    Type Name Description
    Single dx

    The amount to offset the x-coordinate.

    Single dy

    The amount to offset the y-coordinate.

    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()
    | Improve this Doc View Source

    Transform(RectangleF, Matrix3x2)

    Transforms a rectangle by the given matrix.

    Declaration
    public static RectangleF Transform(RectangleF rectangle, Matrix3x2 matrix)
    Parameters
    Type Name Description
    RectangleF rectangle

    The source rectangle.

    Matrix3x2 matrix

    The transformation matrix.

    Returns
    Type Description
    RectangleF

    A transformed RectangleF.

    | Improve this Doc View Source

    Union(RectangleF, RectangleF)

    Creates a rectangle that represents the union between a and b.

    Declaration
    public static RectangleF Union(RectangleF a, RectangleF b)
    Parameters
    Type Name Description
    RectangleF a

    The first rectangle.

    RectangleF b

    The second rectangle.

    Returns
    Type Description
    RectangleF

    The RectangleF.

    Operators

    | Improve this Doc View Source

    Equality(RectangleF, RectangleF)

    Compares two RectangleF objects for equality.

    Declaration
    public static bool operator ==(RectangleF left, RectangleF right)
    Parameters
    Type Name Description
    RectangleF left

    The RectangleF on the left side of the operand.

    RectangleF right

    The RectangleF on the right side of the operand.

    Returns
    Type Description
    Boolean

    True if the current left is equal to the right parameter; otherwise, false.

    | Improve this Doc View Source

    Explicit(RectangleF to Rectangle)

    Creates a Rectangle with the coordinates of the specified RectangleF by truncating each coordinate.

    Declaration
    public static explicit operator Rectangle(RectangleF rectangle)
    Parameters
    Type Name Description
    RectangleF rectangle

    The rectangle.

    Returns
    Type Description
    Rectangle
    | Improve this Doc View Source

    Inequality(RectangleF, RectangleF)

    Compares two RectangleF objects for inequality.

    Declaration
    public static bool operator !=(RectangleF left, RectangleF right)
    Parameters
    Type Name Description
    RectangleF left

    The RectangleF on the left side of the operand.

    RectangleF right

    The RectangleF on the right side of the operand.

    Returns
    Type Description
    Boolean

    True if the current left is unequal to the right parameter; otherwise, false.

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX