mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 17:28:58 +00:00
classref: Add property overview and setter/getter like in editor docs
Output from godotengine/godot#22013. Fixes #1729.
This commit is contained in:
+33
-19
@@ -14,6 +14,17 @@ Brief Description
|
||||
|
||||
2D Axis-aligned bounding box.
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
+-------------------------------+---------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`end<class_Rect2_end>` |
|
||||
+-------------------------------+---------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`position<class_Rect2_position>` |
|
||||
+-------------------------------+---------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`size<class_Rect2_size>` |
|
||||
+-------------------------------+---------------------------------------+
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
@@ -56,108 +67,111 @@ Tutorials
|
||||
---------
|
||||
|
||||
- :doc:`../tutorials/math/index`
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_Rect2_end:
|
||||
|
||||
- :ref:`Vector2<class_Vector2>` **end** - Ending corner.
|
||||
- :ref:`Vector2<class_Vector2>` **end**
|
||||
|
||||
Ending corner.
|
||||
|
||||
.. _class_Rect2_position:
|
||||
|
||||
- :ref:`Vector2<class_Vector2>` **position** - Position (starting corner).
|
||||
- :ref:`Vector2<class_Vector2>` **position**
|
||||
|
||||
Position (starting corner).
|
||||
|
||||
.. _class_Rect2_size:
|
||||
|
||||
- :ref:`Vector2<class_Vector2>` **size** - Size from position to end.
|
||||
- :ref:`Vector2<class_Vector2>` **size**
|
||||
|
||||
Size from position to end.
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_Rect2_Rect2:
|
||||
.. _class_Rect2_Rect2:
|
||||
|
||||
- :ref:`Rect2<class_Rect2>` **Rect2** **(** :ref:`Vector2<class_Vector2>` position, :ref:`Vector2<class_Vector2>` size **)**
|
||||
|
||||
Constructs a ``Rect2`` by position and size.
|
||||
|
||||
.. _class_Rect2_Rect2:
|
||||
.. _class_Rect2_Rect2:
|
||||
|
||||
- :ref:`Rect2<class_Rect2>` **Rect2** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` width, :ref:`float<class_float>` height **)**
|
||||
|
||||
Constructs a ``Rect2`` by x, y, width, and height.
|
||||
|
||||
.. _class_Rect2_abs:
|
||||
.. _class_Rect2_abs:
|
||||
|
||||
- :ref:`Rect2<class_Rect2>` **abs** **(** **)**
|
||||
|
||||
Returns a ``Rect2`` with equivalent position and area, modified so that the top-left corner is the origin and ``width`` and ``height`` are positive.
|
||||
|
||||
.. _class_Rect2_clip:
|
||||
.. _class_Rect2_clip:
|
||||
|
||||
- :ref:`Rect2<class_Rect2>` **clip** **(** :ref:`Rect2<class_Rect2>` b **)**
|
||||
|
||||
Returns the intersection of this ``Rect2`` and b.
|
||||
|
||||
.. _class_Rect2_encloses:
|
||||
.. _class_Rect2_encloses:
|
||||
|
||||
- :ref:`bool<class_bool>` **encloses** **(** :ref:`Rect2<class_Rect2>` b **)**
|
||||
|
||||
Returns ``true`` if this ``Rect2`` completely encloses another one.
|
||||
|
||||
.. _class_Rect2_expand:
|
||||
.. _class_Rect2_expand:
|
||||
|
||||
- :ref:`Rect2<class_Rect2>` **expand** **(** :ref:`Vector2<class_Vector2>` to **)**
|
||||
|
||||
Returns this ``Rect2`` expanded to include a given point.
|
||||
|
||||
.. _class_Rect2_get_area:
|
||||
.. _class_Rect2_get_area:
|
||||
|
||||
- :ref:`float<class_float>` **get_area** **(** **)**
|
||||
|
||||
Returns the area of the ``Rect2``.
|
||||
|
||||
.. _class_Rect2_grow:
|
||||
.. _class_Rect2_grow:
|
||||
|
||||
- :ref:`Rect2<class_Rect2>` **grow** **(** :ref:`float<class_float>` by **)**
|
||||
|
||||
Returns a copy of the ``Rect2`` grown a given amount of units towards all the sides.
|
||||
|
||||
.. _class_Rect2_grow_individual:
|
||||
.. _class_Rect2_grow_individual:
|
||||
|
||||
- :ref:`Rect2<class_Rect2>` **grow_individual** **(** :ref:`float<class_float>` left, :ref:`float<class_float>` top, :ref:`float<class_float>` right, :ref:`float<class_float>` bottom **)**
|
||||
|
||||
Returns a copy of the ``Rect2`` grown a given amount of units towards each direction individually.
|
||||
|
||||
.. _class_Rect2_grow_margin:
|
||||
.. _class_Rect2_grow_margin:
|
||||
|
||||
- :ref:`Rect2<class_Rect2>` **grow_margin** **(** :ref:`int<class_int>` margin, :ref:`float<class_float>` by **)**
|
||||
|
||||
Returns a copy of the ``Rect2`` grown a given amount of units towards the Margin direction.
|
||||
|
||||
.. _class_Rect2_has_no_area:
|
||||
.. _class_Rect2_has_no_area:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_no_area** **(** **)**
|
||||
|
||||
Returns ``true`` if the ``Rect2`` is flat or empty.
|
||||
|
||||
.. _class_Rect2_has_point:
|
||||
.. _class_Rect2_has_point:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_point** **(** :ref:`Vector2<class_Vector2>` point **)**
|
||||
|
||||
Returns ``true`` if the ``Rect2`` contains a point.
|
||||
|
||||
.. _class_Rect2_intersects:
|
||||
.. _class_Rect2_intersects:
|
||||
|
||||
- :ref:`bool<class_bool>` **intersects** **(** :ref:`Rect2<class_Rect2>` b **)**
|
||||
|
||||
Returns ``true`` if the ``Rect2`` overlaps with another.
|
||||
|
||||
.. _class_Rect2_merge:
|
||||
.. _class_Rect2_merge:
|
||||
|
||||
- :ref:`Rect2<class_Rect2>` **merge** **(** :ref:`Rect2<class_Rect2>` b **)**
|
||||
|
||||
Returns a larger Rect2 that contains this Rect2 and ``with``.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user