Skip to end of metadata
Go to start of metadata

Represents a struct for rect (float)

Definition

public struct RectF

Summary

The following table summarizes the members exposed in this structure.

Public Constructors

RectF Constructor(float, float, float, float) Create an instance of RectF.
RectF Constructor(PointF, SizeF) Create an instance of RectF.

Public Properties

Bottom Gets the bottom position.
Height Gets or sets the height.
IsEmpty Gets the value indicating whether the struct is empty.
Left Gets the left position.
Location Gets or sets the location.
Right Gets the right position.
Size Gets or sets the size.
Top Gets the top position.
Width Gets or sets the width.
X Gets or sets the X-coordinate value.
Y Gets or sets the Y-coordinate value.

Static Methods

Public Methods

Contains(float, float) Contains
Contains(PointF) Contains
Contains(RectF) Contains
Equals(object) Returns a value indicating whether this instance and a specified rect object represent the same value.
GetHashCode() Returns the hash code for this instance.
Inflate(float, float) Inflate
Inflate(SizeF) Inflate
Intersect(RectF) Intersect
IntersectsWith(RectF) IntersectsWith
Offset(PointF) Add offset.
Offset(float, float) Add offset.
ToString() Returns a string that represents the current object.

Public Constructors

public RectF(float x, float y, float width, float height)

Create an instance of RectF.

Parameters

x The X-coordinate value.
y The Y-coordinate value.
width The rect width.
height The rect height.

public RectF(PointF location, SizeF size)

Create an instance of RectF.

Parameters

location The rect location.
size The rect size.

Public Properties

public float Bottom { get; }

Gets the bottom position.

public float Height { get; set; }

Gets or sets the height.

public bool IsEmpty { get; }

Gets the value indicating whether the struct is empty.

public float Left { get; }

Gets the left position.

public PointF Location { get; set; }

Gets or sets the location.

public float Right { get; }

Gets the right position.

public SizeF Size { get; set; }

Gets or sets the size.

public float Top { get; }

Gets the top position.

public float Width { get; set; }

Gets or sets the width.

public float X { get; set; }

Gets or sets the X-coordinate value.

public float Y { get; set; }

Gets or sets the Y-coordinate value.

Static Methods

public static RectF FromLTRB(float left, float top, float right, float bottom)

FromLTRB

Parameters

left
top
right
bottom

public static RectF Inflate(RectF rect, float x, float y)

Inflate

Parameters

rect
x
y

public static RectF Intersect(RectF a, RectF b)

Intersect

Parameters

a
b

public static RectF Union(RectF a, RectF b)

Union

Parameters

a
b

Public Methods

public bool Contains(float x, float y)

Contains

Parameters

x
y

public bool Contains(PointF pt)

Contains

Parameters

pt

public bool Contains(RectF rect)

Contains

Parameters

rect

public bool Equals(object obj)

Returns a value indicating whether this instance and a specified rect object represent the same value.

Parameters

obj A rect object to compare to this instance.

Return Types

true if obj is equal to this instance; otherwise, false.

public int GetHashCode()

Returns the hash code for this instance.

Return Types

A 32-bit signed integer that is the hash code for this instance.

public void Inflate(float x, float y)

Inflate

Parameters

x
y

public void Inflate(SizeF size)

Inflate

Parameters

size

public void Intersect(RectF rect)

Intersect

Parameters

rect

public bool IntersectsWith(RectF rect)

IntersectsWith

Parameters

rect

public void Offset(PointF pos)

Add offset.

Parameters

pos The point.

public void Offset(float x, float y)

Add offset.

Parameters

x The X-coordinate value.
y The Y-coordinate value.

public string ToString()

Returns a string that represents the current object.

Return Types

A string that represents the current object.
  • No labels