File size: 2,826 Bytes
dc00adb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | # Rectangle
Qualified name: `manim.mobject.geometry.polygram.Rectangle`
### *class* Rectangle(color=ManimColor('#FFFFFF'), height=2.0, width=4.0, grid_xstep=None, grid_ystep=None, mark_paths_closed=True, close_new_points=True, \*\*kwargs)
Bases: [`Polygon`](manim.mobject.geometry.polygram.Polygon.md#manim.mobject.geometry.polygram.Polygon)
A quadrilateral with two sets of parallel sides.
* **Parameters:**
* **color** ([*ParsableManimColor*](manim.utils.color.core.md#manim.utils.color.core.ParsableManimColor)) β The color of the rectangle.
* **height** (*float*) β The vertical height of the rectangle.
* **width** (*float*) β The horizontal width of the rectangle.
* **grid_xstep** (*float* *|* *None*) β Space between vertical grid lines.
* **grid_ystep** (*float* *|* *None*) β Space between horizontal grid lines.
* **mark_paths_closed** (*bool*) β No purpose.
* **close_new_points** (*bool*) β No purpose.
* **kwargs** (*Any*) β Additional arguments to be passed to [`Polygon`](manim.mobject.geometry.polygram.Polygon.md#manim.mobject.geometry.polygram.Polygon)
### Examples
### Methods
### Attributes
| `animate` | Used to animate the application of any method of `self`. |
|-----------------------|------------------------------------------------------------------------|
| `animation_overrides` | |
| `color` | |
| `depth` | The depth of the mobject. |
| `fill_color` | If there are multiple colors (for gradient) this returns the first one |
| `height` | The height of the mobject. |
| `n_points_per_curve` | |
| `sheen_factor` | |
| `stroke_color` | |
| `width` | The width of the mobject. |
#### \_original_\_init_\_(color=ManimColor('#FFFFFF'), height=2.0, width=4.0, grid_xstep=None, grid_ystep=None, mark_paths_closed=True, close_new_points=True, \*\*kwargs)
Initialize self. See help(type(self)) for accurate signature.
* **Parameters:**
* **color** ([*ParsableManimColor*](manim.utils.color.core.md#manim.utils.color.core.ParsableManimColor))
* **height** (*float*)
* **width** (*float*)
* **grid_xstep** (*float* *|* *None*)
* **grid_ystep** (*float* *|* *None*)
* **mark_paths_closed** (*bool*)
* **close_new_points** (*bool*)
* **kwargs** (*Any*)
|