class_rect2i.rst 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Rect2i.xml.
  6. .. _class_Rect2i:
  7. Rect2i
  8. ======
  9. A 2D axis-aligned bounding box using integer coordinates.
  10. .. rst-class:: classref-introduction-group
  11. Description
  12. -----------
  13. The **Rect2i** built-in :ref:`Variant<class_Variant>` type represents an axis-aligned rectangle in a 2D space, using integer coordinates. It is defined by its :ref:`position<class_Rect2i_property_position>` and :ref:`size<class_Rect2i_property_size>`, which are :ref:`Vector2i<class_Vector2i>`. Because it does not rotate, it is frequently used for fast overlap tests (see :ref:`intersects()<class_Rect2i_method_intersects>`).
  14. For floating-point coordinates, see :ref:`Rect2<class_Rect2>`.
  15. \ **Note:** Negative values for :ref:`size<class_Rect2i_property_size>` are not supported. With negative size, most **Rect2i** methods do not work correctly. Use :ref:`abs()<class_Rect2i_method_abs>` to get an equivalent **Rect2i** with a non-negative size.
  16. \ **Note:** In a boolean context, a **Rect2i** evaluates to ``false`` if both :ref:`position<class_Rect2i_property_position>` and :ref:`size<class_Rect2i_property_size>` are zero (equal to :ref:`Vector2i.ZERO<class_Vector2i_constant_ZERO>`). Otherwise, it always evaluates to ``true``.
  17. .. note::
  18. There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information.
  19. .. rst-class:: classref-introduction-group
  20. Tutorials
  21. ---------
  22. - :doc:`Math documentation index <../tutorials/math/index>`
  23. - :doc:`Vector math <../tutorials/math/vector_math>`
  24. .. rst-class:: classref-reftable-group
  25. Properties
  26. ----------
  27. .. table::
  28. :widths: auto
  29. +---------------------------------+-------------------------------------------------+--------------------+
  30. | :ref:`Vector2i<class_Vector2i>` | :ref:`end<class_Rect2i_property_end>` | ``Vector2i(0, 0)`` |
  31. +---------------------------------+-------------------------------------------------+--------------------+
  32. | :ref:`Vector2i<class_Vector2i>` | :ref:`position<class_Rect2i_property_position>` | ``Vector2i(0, 0)`` |
  33. +---------------------------------+-------------------------------------------------+--------------------+
  34. | :ref:`Vector2i<class_Vector2i>` | :ref:`size<class_Rect2i_property_size>` | ``Vector2i(0, 0)`` |
  35. +---------------------------------+-------------------------------------------------+--------------------+
  36. .. rst-class:: classref-reftable-group
  37. Constructors
  38. ------------
  39. .. table::
  40. :widths: auto
  41. +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>`\ (\ ) |
  43. +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>`\ (\ from\: :ref:`Rect2i<class_Rect2i>`\ ) |
  45. +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>`\ (\ from\: :ref:`Rect2<class_Rect2>`\ ) |
  47. +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
  49. +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>`\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`\ ) |
  51. +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. .. rst-class:: classref-reftable-group
  53. Methods
  54. -------
  55. .. table::
  56. :widths: auto
  57. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`Rect2i<class_Rect2i>` | :ref:`abs<class_Rect2i_method_abs>`\ (\ ) |const| |
  59. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`bool<class_bool>` | :ref:`encloses<class_Rect2i_method_encloses>`\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| |
  61. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`Rect2i<class_Rect2i>` | :ref:`expand<class_Rect2i_method_expand>`\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  63. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`int<class_int>` | :ref:`get_area<class_Rect2i_method_get_area>`\ (\ ) |const| |
  65. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`Vector2i<class_Vector2i>` | :ref:`get_center<class_Rect2i_method_get_center>`\ (\ ) |const| |
  67. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Rect2i<class_Rect2i>` | :ref:`grow<class_Rect2i_method_grow>`\ (\ amount\: :ref:`int<class_int>`\ ) |const| |
  69. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`Rect2i<class_Rect2i>` | :ref:`grow_individual<class_Rect2i_method_grow_individual>`\ (\ left\: :ref:`int<class_int>`, top\: :ref:`int<class_int>`, right\: :ref:`int<class_int>`, bottom\: :ref:`int<class_int>`\ ) |const| |
  71. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`Rect2i<class_Rect2i>` | :ref:`grow_side<class_Rect2i_method_grow_side>`\ (\ side\: :ref:`int<class_int>`, amount\: :ref:`int<class_int>`\ ) |const| |
  73. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`bool<class_bool>` | :ref:`has_area<class_Rect2i_method_has_area>`\ (\ ) |const| |
  75. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`bool<class_bool>` | :ref:`has_point<class_Rect2i_method_has_point>`\ (\ point\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  77. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`Rect2i<class_Rect2i>` | :ref:`intersection<class_Rect2i_method_intersection>`\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| |
  79. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`bool<class_bool>` | :ref:`intersects<class_Rect2i_method_intersects>`\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| |
  81. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`Rect2i<class_Rect2i>` | :ref:`merge<class_Rect2i_method_merge>`\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| |
  83. +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. .. rst-class:: classref-reftable-group
  85. Operators
  86. ---------
  87. .. table::
  88. :widths: auto
  89. +-------------------------+-------------------------------------------------------------------------------------------------+
  90. | :ref:`bool<class_bool>` | :ref:`operator !=<class_Rect2i_operator_neq_Rect2i>`\ (\ right\: :ref:`Rect2i<class_Rect2i>`\ ) |
  91. +-------------------------+-------------------------------------------------------------------------------------------------+
  92. | :ref:`bool<class_bool>` | :ref:`operator ==<class_Rect2i_operator_eq_Rect2i>`\ (\ right\: :ref:`Rect2i<class_Rect2i>`\ ) |
  93. +-------------------------+-------------------------------------------------------------------------------------------------+
  94. .. rst-class:: classref-section-separator
  95. ----
  96. .. rst-class:: classref-descriptions-group
  97. Property Descriptions
  98. ---------------------
  99. .. _class_Rect2i_property_end:
  100. .. rst-class:: classref-property
  101. :ref:`Vector2i<class_Vector2i>` **end** = ``Vector2i(0, 0)`` :ref:`🔗<class_Rect2i_property_end>`
  102. The ending point. This is usually the bottom-right corner of the rectangle, and is equivalent to ``position + size``. Setting this point affects the :ref:`size<class_Rect2i_property_size>`.
  103. .. rst-class:: classref-item-separator
  104. ----
  105. .. _class_Rect2i_property_position:
  106. .. rst-class:: classref-property
  107. :ref:`Vector2i<class_Vector2i>` **position** = ``Vector2i(0, 0)`` :ref:`🔗<class_Rect2i_property_position>`
  108. The origin point. This is usually the top-left corner of the rectangle.
  109. .. rst-class:: classref-item-separator
  110. ----
  111. .. _class_Rect2i_property_size:
  112. .. rst-class:: classref-property
  113. :ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Rect2i_property_size>`
  114. The rectangle's width and height, starting from :ref:`position<class_Rect2i_property_position>`. Setting this value also affects the :ref:`end<class_Rect2i_property_end>` point.
  115. \ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position<class_Rect2i_property_position>` is the top-left corner, and the :ref:`end<class_Rect2i_property_end>` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs()<class_Rect2i_method_abs>`.
  116. .. rst-class:: classref-section-separator
  117. ----
  118. .. rst-class:: classref-descriptions-group
  119. Constructor Descriptions
  120. ------------------------
  121. .. _class_Rect2i_constructor_Rect2i:
  122. .. rst-class:: classref-constructor
  123. :ref:`Rect2i<class_Rect2i>` **Rect2i**\ (\ ) :ref:`🔗<class_Rect2i_constructor_Rect2i>`
  124. Constructs a **Rect2i** with its :ref:`position<class_Rect2i_property_position>` and :ref:`size<class_Rect2i_property_size>` set to :ref:`Vector2i.ZERO<class_Vector2i_constant_ZERO>`.
  125. .. rst-class:: classref-item-separator
  126. ----
  127. .. rst-class:: classref-constructor
  128. :ref:`Rect2i<class_Rect2i>` **Rect2i**\ (\ from\: :ref:`Rect2i<class_Rect2i>`\ )
  129. Constructs a **Rect2i** as a copy of the given **Rect2i**.
  130. .. rst-class:: classref-item-separator
  131. ----
  132. .. rst-class:: classref-constructor
  133. :ref:`Rect2i<class_Rect2i>` **Rect2i**\ (\ from\: :ref:`Rect2<class_Rect2>`\ )
  134. Constructs a **Rect2i** from a :ref:`Rect2<class_Rect2>`. The floating-point coordinates are truncated.
  135. .. rst-class:: classref-item-separator
  136. ----
  137. .. rst-class:: classref-constructor
  138. :ref:`Rect2i<class_Rect2i>` **Rect2i**\ (\ position\: :ref:`Vector2i<class_Vector2i>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
  139. Constructs a **Rect2i** by ``position`` and ``size``.
  140. .. rst-class:: classref-item-separator
  141. ----
  142. .. rst-class:: classref-constructor
  143. :ref:`Rect2i<class_Rect2i>` **Rect2i**\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`\ )
  144. Constructs a **Rect2i** by setting its :ref:`position<class_Rect2i_property_position>` to (``x``, ``y``), and its :ref:`size<class_Rect2i_property_size>` to (``width``, ``height``).
  145. .. rst-class:: classref-section-separator
  146. ----
  147. .. rst-class:: classref-descriptions-group
  148. Method Descriptions
  149. -------------------
  150. .. _class_Rect2i_method_abs:
  151. .. rst-class:: classref-method
  152. :ref:`Rect2i<class_Rect2i>` **abs**\ (\ ) |const| :ref:`🔗<class_Rect2i_method_abs>`
  153. Returns a **Rect2i** equivalent to this rectangle, with its width and height modified to be non-negative values, and with its :ref:`position<class_Rect2i_property_position>` being the top-left corner of the rectangle.
  154. .. tabs::
  155. .. code-tab:: gdscript
  156. var rect = Rect2i(25, 25, -100, -50)
  157. var absolute = rect.abs() # absolute is Rect2i(-75, -25, 100, 50)
  158. .. code-tab:: csharp
  159. var rect = new Rect2I(25, 25, -100, -50);
  160. var absolute = rect.Abs(); // absolute is Rect2I(-75, -25, 100, 50)
  161. \ **Note:** It's recommended to use this method when :ref:`size<class_Rect2i_property_size>` is negative, as most other methods in Godot assume that the :ref:`position<class_Rect2i_property_position>` is the top-left corner, and the :ref:`end<class_Rect2i_property_end>` is the bottom-right corner.
  162. .. rst-class:: classref-item-separator
  163. ----
  164. .. _class_Rect2i_method_encloses:
  165. .. rst-class:: classref-method
  166. :ref:`bool<class_bool>` **encloses**\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_encloses>`
  167. Returns ``true`` if this **Rect2i** completely encloses another one.
  168. .. rst-class:: classref-item-separator
  169. ----
  170. .. _class_Rect2i_method_expand:
  171. .. rst-class:: classref-method
  172. :ref:`Rect2i<class_Rect2i>` **expand**\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_expand>`
  173. Returns a copy of this rectangle expanded to align the edges with the given ``to`` point, if necessary.
  174. .. tabs::
  175. .. code-tab:: gdscript
  176. var rect = Rect2i(0, 0, 5, 2)
  177. rect = rect.expand(Vector2i(10, 0)) # rect is Rect2i(0, 0, 10, 2)
  178. rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 15, 5)
  179. .. code-tab:: csharp
  180. var rect = new Rect2I(0, 0, 5, 2);
  181. rect = rect.Expand(new Vector2I(10, 0)); // rect is Rect2I(0, 0, 10, 2)
  182. rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 15, 5)
  183. .. rst-class:: classref-item-separator
  184. ----
  185. .. _class_Rect2i_method_get_area:
  186. .. rst-class:: classref-method
  187. :ref:`int<class_int>` **get_area**\ (\ ) |const| :ref:`🔗<class_Rect2i_method_get_area>`
  188. Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area()<class_Rect2i_method_has_area>`.
  189. .. rst-class:: classref-item-separator
  190. ----
  191. .. _class_Rect2i_method_get_center:
  192. .. rst-class:: classref-method
  193. :ref:`Vector2i<class_Vector2i>` **get_center**\ (\ ) |const| :ref:`🔗<class_Rect2i_method_get_center>`
  194. Returns the center point of the rectangle. This is the same as ``position + (size / 2)``.
  195. \ **Note:** If the :ref:`size<class_Rect2i_property_size>` is odd, the result will be rounded towards :ref:`position<class_Rect2i_property_position>`.
  196. .. rst-class:: classref-item-separator
  197. ----
  198. .. _class_Rect2i_method_grow:
  199. .. rst-class:: classref-method
  200. :ref:`Rect2i<class_Rect2i>` **grow**\ (\ amount\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Rect2i_method_grow>`
  201. Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual()<class_Rect2i_method_grow_individual>` and :ref:`grow_side()<class_Rect2i_method_grow_side>`.
  202. .. tabs::
  203. .. code-tab:: gdscript
  204. var a = Rect2i(4, 4, 8, 8).grow(4) # a is Rect2i(0, 0, 16, 16)
  205. var b = Rect2i(0, 0, 8, 4).grow(2) # b is Rect2i(-2, -2, 12, 8)
  206. .. code-tab:: csharp
  207. var a = new Rect2I(4, 4, 8, 8).Grow(4); // a is Rect2I(0, 0, 16, 16)
  208. var b = new Rect2I(0, 0, 8, 4).Grow(2); // b is Rect2I(-2, -2, 12, 8)
  209. .. rst-class:: classref-item-separator
  210. ----
  211. .. _class_Rect2i_method_grow_individual:
  212. .. rst-class:: classref-method
  213. :ref:`Rect2i<class_Rect2i>` **grow_individual**\ (\ left\: :ref:`int<class_int>`, top\: :ref:`int<class_int>`, right\: :ref:`int<class_int>`, bottom\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Rect2i_method_grow_individual>`
  214. Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow()<class_Rect2i_method_grow>` and :ref:`grow_side()<class_Rect2i_method_grow_side>`.
  215. .. rst-class:: classref-item-separator
  216. ----
  217. .. _class_Rect2i_method_grow_side:
  218. .. rst-class:: classref-method
  219. :ref:`Rect2i<class_Rect2i>` **grow_side**\ (\ side\: :ref:`int<class_int>`, amount\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Rect2i_method_grow_side>`
  220. Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side<enum_@GlobalScope_Side>` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow()<class_Rect2i_method_grow>` and :ref:`grow_individual()<class_Rect2i_method_grow_individual>`.
  221. .. rst-class:: classref-item-separator
  222. ----
  223. .. _class_Rect2i_method_has_area:
  224. .. rst-class:: classref-method
  225. :ref:`bool<class_bool>` **has_area**\ (\ ) |const| :ref:`🔗<class_Rect2i_method_has_area>`
  226. Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area()<class_Rect2i_method_get_area>`.
  227. .. rst-class:: classref-item-separator
  228. ----
  229. .. _class_Rect2i_method_has_point:
  230. .. rst-class:: classref-method
  231. :ref:`bool<class_bool>` **has_point**\ (\ point\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_has_point>`
  232. Returns ``true`` if the rectangle contains the given ``point``. By convention, points on the right and bottom edges are **not** included.
  233. \ **Note:** This method is not reliable for **Rect2i** with a *negative* :ref:`size<class_Rect2i_property_size>`. Use :ref:`abs()<class_Rect2i_method_abs>` first to get a valid rectangle.
  234. .. rst-class:: classref-item-separator
  235. ----
  236. .. _class_Rect2i_method_intersection:
  237. .. rst-class:: classref-method
  238. :ref:`Rect2i<class_Rect2i>` **intersection**\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_intersection>`
  239. Returns the intersection between this rectangle and ``b``. If the rectangles do not intersect, returns an empty **Rect2i**.
  240. .. tabs::
  241. .. code-tab:: gdscript
  242. var a = Rect2i(0, 0, 5, 10)
  243. var b = Rect2i(2, 0, 8, 4)
  244. var c = a.intersection(b) # c is Rect2i(2, 0, 3, 4)
  245. .. code-tab:: csharp
  246. var a = new Rect2I(0, 0, 5, 10);
  247. var b = new Rect2I(2, 0, 8, 4);
  248. var c = rect1.Intersection(rect2); // c is Rect2I(2, 0, 3, 4)
  249. \ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects()<class_Rect2i_method_intersects>`, instead.
  250. .. rst-class:: classref-item-separator
  251. ----
  252. .. _class_Rect2i_method_intersects:
  253. .. rst-class:: classref-method
  254. :ref:`bool<class_bool>` **intersects**\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_intersects>`
  255. Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges of both rectangles are excluded.
  256. .. rst-class:: classref-item-separator
  257. ----
  258. .. _class_Rect2i_method_merge:
  259. .. rst-class:: classref-method
  260. :ref:`Rect2i<class_Rect2i>` **merge**\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_merge>`
  261. Returns a **Rect2i** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses()<class_Rect2i_method_encloses>`.
  262. .. rst-class:: classref-section-separator
  263. ----
  264. .. rst-class:: classref-descriptions-group
  265. Operator Descriptions
  266. ---------------------
  267. .. _class_Rect2i_operator_neq_Rect2i:
  268. .. rst-class:: classref-operator
  269. :ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`🔗<class_Rect2i_operator_neq_Rect2i>`
  270. Returns ``true`` if the :ref:`position<class_Rect2i_property_position>` or :ref:`size<class_Rect2i_property_size>` of both rectangles are not equal.
  271. .. rst-class:: classref-item-separator
  272. ----
  273. .. _class_Rect2i_operator_eq_Rect2i:
  274. .. rst-class:: classref-operator
  275. :ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`🔗<class_Rect2i_operator_eq_Rect2i>`
  276. Returns ``true`` if both :ref:`position<class_Rect2i_property_position>` and :ref:`size<class_Rect2i_property_size>` of the rectangles are equal, respectively.
  277. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  278. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  279. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  280. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  281. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  282. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  283. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  284. .. |void| replace:: :abbr:`void (No return value.)`