Skip to content
Eduard Gushchin edited this page Jul 1, 2026 · 5 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.Rect2I
Namespace Electron2D
Kind struct
Category Math and Data

Overview

Represents the rect2 i value type.

Syntax

public struct Electron2D.Rect2I : System.IEquatable<Electron2D.Rect2I>

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: Rect2I

Integer axis-aligned rectangle baseline with intersection, merge, grow and normalization helpers.

Remarks

This type is part of the Electron2D 0.1.0 Preview public API.

Thread Safety

Instances of this type are not synchronized. Access them from the thread that owns the object unless the member documentation states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

Members

Member Kind Summary
End Property Gets or sets the end value.
Position Property Gets or sets the position value.
Size Property Gets or sets the size value.
Electron2D.Rect2I(Electron2D.Vector2I, Electron2D.Vector2I) Constructor Initializes a new instance of the Rect2I type.
Electron2D.Rect2I(System.Int32, System.Int32, System.Int32, System.Int32) Constructor Initializes a new instance of the Rect2I type.
Abs() Method Executes the abs operation.
Encloses(Electron2D.Rect2I) Method Executes the encloses operation.
Equals(Electron2D.Rect2I) Method Executes the equals operation.
Equals(System.Object) Method Executes the equals operation.
Expand(Electron2D.Vector2I) Method Executes the expand operation.
GetArea() Method Gets the area value.
GetCenter() Method Gets the center value.
GetHashCode() Method Gets the hash code value.
Grow(System.Int32) Method Executes the grow operation.
HasArea() Method Checks whether area is available.
HasPoint(Electron2D.Vector2I) Method Checks whether point is available.
Intersection(Electron2D.Rect2I) Method Executes the intersection operation.
Intersects(Electron2D.Rect2I, System.Boolean) Method Executes the intersects operation.
Merge(Electron2D.Rect2I) Method Executes the merge operation.
ToString() Method Executes the to string operation.
op_Equality(Electron2D.Rect2I, Electron2D.Rect2I) Method Applies the == operator.
op_Inequality(Electron2D.Rect2I, Electron2D.Rect2I) Method Applies the != operator.

Member Details

End

Kind: Property

public Electron2D.Vector2I End { get; set; }

Summary

Gets or sets the end value.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current end value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Position

Kind: Property

public Electron2D.Vector2I Position { get; set; }

Summary

Gets or sets the position value.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current position value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Size

Kind: Property

public Electron2D.Vector2I Size { get; set; }

Summary

Gets or sets the size value.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current size value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Electron2D.Rect2I(Electron2D.Vector2I, Electron2D.Vector2I)

Kind: Constructor

public Electron2D.Rect2I(Electron2D.Vector2I position, Electron2D.Vector2I size)

Summary

Initializes a new instance of the Rect2I type.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Parameters

  • position: The position value.
  • size: The size value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Electron2D.Rect2I(System.Int32, System.Int32, System.Int32, System.Int32)

Kind: Constructor

public Electron2D.Rect2I(System.Int32 x, System.Int32 y, System.Int32 width, System.Int32 height)

Summary

Initializes a new instance of the Rect2I type.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Parameters

  • x: The X coordinate or component.
  • y: The Y coordinate or component.
  • width: The width value.
  • height: The height value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Abs()

Kind: Method

public Electron2D.Rect2I Abs()()

Summary

Executes the abs operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Encloses(Electron2D.Rect2I)

Kind: Method

public System.Boolean Encloses(Electron2D.Rect2I)(Electron2D.Rect2I rect)

Summary

Executes the encloses operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • rect: The rect value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Equals(Electron2D.Rect2I)

Kind: Method

public System.Boolean Equals(Electron2D.Rect2I)(Electron2D.Rect2I other)

Summary

Executes the equals operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • other: The other value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Equals(System.Object)

Kind: Method

public System.Boolean Equals(System.Object)(System.Object obj)

Summary

Executes the equals operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • obj: The obj value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Expand(Electron2D.Vector2I)

Kind: Method

public Electron2D.Rect2I Expand(Electron2D.Vector2I)(Electron2D.Vector2I to)

Summary

Executes the expand operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • to: The to value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

GetArea()

Kind: Method

public System.Int32 GetArea()()

Summary

Gets the area value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current area value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

GetCenter()

Kind: Method

public Electron2D.Vector2I GetCenter()()

Summary

Gets the center value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current center value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

GetHashCode()

Kind: Method

public System.Int32 GetHashCode()()

Summary

Gets the hash code value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current hash code value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Grow(System.Int32)

Kind: Method

public Electron2D.Rect2I Grow(System.Int32)(System.Int32 amount)

Summary

Executes the grow operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • amount: The amount value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

HasArea()

Kind: Method

public System.Boolean HasArea()()

Summary

Checks whether area is available.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

true when the condition is met; otherwise, false.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

HasPoint(Electron2D.Vector2I)

Kind: Method

public System.Boolean HasPoint(Electron2D.Vector2I)(Electron2D.Vector2I point)

Summary

Checks whether point is available.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • point: The point value.

Returns

true when the condition is met; otherwise, false.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Intersection(Electron2D.Rect2I)

Kind: Method

public Electron2D.Rect2I Intersection(Electron2D.Rect2I)(Electron2D.Rect2I rect)

Summary

Executes the intersection operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • rect: The rect value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Intersects(Electron2D.Rect2I, System.Boolean)

Kind: Method

public System.Boolean Intersects(Electron2D.Rect2I, System.Boolean)(Electron2D.Rect2I rect, System.Boolean includeBorders)

Summary

Executes the intersects operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • rect: The rect value.
  • includeBorders: The include borders value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Merge(Electron2D.Rect2I)

Kind: Method

public Electron2D.Rect2I Merge(Electron2D.Rect2I)(Electron2D.Rect2I rect)

Summary

Executes the merge operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • rect: The rect value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

ToString()

Kind: Method

public System.String ToString()()

Summary

Executes the to string operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

op_Equality(Electron2D.Rect2I, Electron2D.Rect2I)

Kind: Method

public static System.Boolean op_Equality(Electron2D.Rect2I, Electron2D.Rect2I)(Electron2D.Rect2I left, Electron2D.Rect2I right)

Summary

Applies the == operator.

Remarks

This operator returns a value derived from the supplied operands.

Parameters

  • left: The left value.
  • right: The right value.

Returns

The result of the operator.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

op_Inequality(Electron2D.Rect2I, Electron2D.Rect2I)

Kind: Method

public static System.Boolean op_Inequality(Electron2D.Rect2I, Electron2D.Rect2I)(Electron2D.Rect2I left, Electron2D.Rect2I right)

Summary

Applies the != operator.

Remarks

This operator returns a value derived from the supplied operands.

Parameters

  • left: The left value.
  • right: The right value.

Returns

The result of the operator.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Rect2I

Clone this wiki locally