Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Added Mobject.stretch_to_fit_depth

Grant Sandersonad13082b73f0
diff --git a/mobject/mobject.py b/mobject/mobject.py
index 6618d1aa2..8bb2f268f 100644
--- a/mobject/mobject.py
+++ b/mobject/mobject.py
@@ -389,6 +389,9 @@ class Mobject(Container):
def stretch_to_fit_height(self, height, **kwargs):
return self.rescale_to_fit(height, 1, stretch = True, **kwargs)
+ def stretch_to_fit_depth(self, depth, **kwargs):
+ return self.rescale_to_fit(depth, 1, stretch = True, **kwargs)
+
def scale_to_fit_width(self, width, **kwargs):
return self.rescale_to_fit(width, 0, stretch = False, **kwargs)