A community-maintained Python framework for creating mathematical animations.
Added example to :class:`~.SurroundingRectangle` (#1689)
MathInvariance4225e1979198
diff --git a/manim/mobject/shape_matchers.py b/manim/mobject/shape_matchers.pyindex 89f2e2fc1..4d4f39dde 100644--- a/manim/mobject/shape_matchers.py+++ b/manim/mobject/shape_matchers.py@@ -10,6 +10,27 @@ from ..utils.color import BLACK, RED, YELLOW, Colorclass SurroundingRectangle(Rectangle):+ r"""A rectangle surrounding a :class:`~.Mobject`++ Examples+ --------++ .. manim:: SurroundingRectExample+ :save_last_frame:++ class SurroundingRectExample(Scene):+ def construct(self):+ title = Title("A Quote from Newton")+ quote = Text(+ "If I have seen further than others, \n"+ "it is by standing upon the shoulders of giants.",+ color=BLUE+ ).scale(0.75)+ box = SurroundingRectangle(quote, color=YELLOW, buff=MED_LARGE_BUFF)+ self.add(title, box, quote)++ """+def __init__(self, mobject, color=YELLOW, buff=SMALL_BUFF, **kwargs):self.color = colorself.buff = buff