Skip to end of metadata
Go to start of metadata

Represents a struct for rect (integer)

Definition

public struct RectI

Summary

The following table summarizes the members exposed in this structure.

Public Constructors

RectI Constructor(int, int, int, int) Create an instance of RectF.
RectI Constructor(PointI, SizeI) 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(int, int) Contains
Contains(PointI) Contains
Contains(RectI) 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(int, int) Inflate
Inflate(SizeI) Inflate
Intersect(RectI) Intersect
IntersectsWith(RectI) IntersectsWith
Offset(PointI) Add Offset
Offset(int, int) Add Offset
ToString() Returns a string that represents the current object.

Public Constructors

public RectI(int x, int y, int width, int 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 RectI(PointI location, SizeI size)

Create an instance of RectF.

Parameters

location The rect location.
size The rect size.

Public Properties

public int Bottom { get; }

Gets the bottom position.

public int Height { get; set; }

Gets or sets the height.

public bool IsEmpty { get; }

Gets the value indicating whether the struct is empty.

public int Left { get; }

Gets the left position.

public PointI Location { get; set; }

Gets or sets the location.

public int Right { get; }

Gets the right position.

public SizeI Size { get; set; }

Gets or sets the size.

public int Top { get; }

Gets the top position.

public int Width { get; set; }

Gets or sets the width.

public int X { get; set; }

Gets or sets the X-coordinate value.

public int Y { get; set; }

Gets or sets the Y-coordinate value.

Static Methods

public static RectI Ceiling(RectF value)

Ceiling

Parameters

value

public static RectI FromLTRB(int left, int top, int right, int bottom)

FromLTRB

Parameters

left
top
right
bottom

public static RectI Inflate(RectI rect, int x, int y)

Inflate

Parameters

rect
x
y

public static RectI Intersect(RectI a, RectI b)

Intersect

Parameters

a
b

public static RectI Round(RectF value)

Parameters

value

public static RectI Truncate(RectF value)

Truncate

Parameters

value

public static RectI Union(RectI a, RectI b)

Union

Parameters

a
b

Public Methods

public bool Contains(int x, int y)

Contains

Parameters

x
y

public bool Contains(PointI pt)

Contains

Parameters

pt

public bool Contains(RectI 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(int width, int height)

Inflate

Parameters

width
height

public void Inflate(SizeI size)

Inflate

Parameters

size

public void Intersect(RectI rect)

Intersect

Parameters

rect

public bool IntersectsWith(RectI rect)

IntersectsWith

Parameters

rect

public void Offset(PointI pos)

Add Offset

Parameters

pos

public void Offset(int x, int y)

Add Offset

Parameters

x
y

public string ToString()

Returns a string that represents the current object.

Return Types

A string that represents the current object.
  • No labels