Share via


RectF Struct

Definition

Represents a rectangle with single-precision floating-point x, y coordinates and width and height.

public value class RectF
[System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Graphics.Converters.RectFTypeConverter))]
public struct RectF
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Graphics.Converters.RectFTypeConverter))>]
type RectF = struct
Public Structure RectF
Inheritance
RectF
Attributes

Constructors

Name Description
RectF(PointF, SizeF)
RectF(Single, Single, Single, Single)

Fields

Name Description
Zero

Represents a RectF with all values set to 0.

Properties

Name Description
Bottom
Center
Height

Gets or sets the height of the rectangle.

IsEmpty
Left
Location
Right
Size
Top
Width

Gets or sets the width of the rectangle.

X

Gets or sets the x-coordinate of the rectangle's left edge.

Y

Gets or sets the y-coordinate of the rectangle's top edge.

Methods

Name Description
Contains(PointF)
Contains(RectF)
Contains(Single, Single)
Deconstruct(Single, Single, Single, Single)
Equals(Object)
Equals(RectF)
FromLTRB(Single, Single, Single, Single)
GetHashCode()
Inflate(Single, Single)
Inflate(SizeF)
Intersect(RectF, RectF)
Intersect(RectF)
IntersectsWith(RectF)
Offset(PointF)
Offset(Single, Single)
Round()
ToString()
TryParse(String, RectF)
Union(RectF, RectF)
Union(RectF)

Operators

Name Description
Equality(RectF, RectF)
Implicit(RectF to Rect)
Inequality(RectF, RectF)

Extension Methods

Name Description
AsSKRect(RectF)

Converts a RectF to a SkiaSharp SKRect.

Lerp(RectF, RectF, Double)

Applies to