manim.mobject.geometry.RoundedRectangle

class RoundedRectangle(corner_radius=0.5, **kwargs)[source]

Bases: manim.mobject.geometry.Rectangle

A rectangle with rounded corners.

Parameters
  • corner_radius (float, optional) – The curvature of the corners of the rectangle.

  • kwargs (Any) – Additional arguments to be passed to Rectangle

Examples

Example: RoundedRectangleExample

../_images/RoundedRectangleExample-1.png
from manim import *

class RoundedRectangleExample(Scene):
    def construct(self):
        rect_1 = RoundedRectangle(corner_radius=0.5)
        rect_2 = RoundedRectangle(corner_radius=1.5, height=4.0, width=4.0)

        rect_group = Group(rect_1, rect_2).arrange(buff=1)
        self.add(rect_group)

Methods

Attributes

animate

Used to animate the application of a method.

animation_overrides

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.