GraphicsAPI reference
Struct RectI
Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device
An integer rectangle in pixels: origin top-left, x to the right, y down; right and bottom exclusive.
public readonly struct RectI : IEquatable<RectI>Implements
Constructors
RectI(int, int, int, int)
An integer rectangle in pixels: origin top-left, x to the right, y down; right and bottom exclusive.
public RectI(int X, int Y, int Width, int Height)Parameters
X int
Left edge (inclusive).
Y int
Top edge (inclusive).
Width int
Width in pixels.
Height int
Height in pixels.
Properties
Bottom
Bottom edge (exclusive).
public int Bottom { get; }Property Value
Height
Height in pixels.
public int Height { get; init; }Property Value
IsEmpty
True when the rectangle covers no pixel.
public bool IsEmpty { get; }Property Value
Right
Right edge (exclusive).
public int Right { get; }Property Value
Width
Width in pixels.
public int Width { get; init; }Property Value
X
Left edge (inclusive).
public int X { get; init; }Property Value
Y
Top edge (inclusive).
public int Y { get; init; }Property Value
Methods
Contains(RectI)
True when other lies entirely inside this rectangle.
public bool Contains(RectI other)Parameters
other RectI
Returns
Deconstruct(out int, out int, out int, out int)
public void Deconstruct(out int X, out int Y, out int Width, out int Height)Parameters
X int
Y int
Width int
Height int
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(RectI)
public bool Equals(RectI other)Parameters
other RectI
Returns
GetHashCode()
public override int GetHashCode()Returns
Intersect(RectI)
The overlap of two rectangles (empty when they do not overlap).
public RectI Intersect(RectI other)Parameters
other RectI
Returns
ToString()
public override string ToString()Returns
Operators
operator ==(RectI, RectI)
public static bool operator ==(RectI left, RectI right)Parameters
left RectI
right RectI
Returns
operator !=(RectI, RectI)
public static bool operator !=(RectI left, RectI right)Parameters
left RectI
right RectI