Refactoring how Camera frame height and width are handled

This commit is contained in:
Grant Sanderson
2018-05-11 17:41:37 -07:00
parent f0b8ae7647
commit f04b2e270c
8 changed files with 112 additions and 55 deletions

View File

@ -199,6 +199,15 @@ class Mobject(Container):
)
return self
def apply_function_to_position(self, function):
self.move_to(function(self.get_center()))
return self
def apply_function_to_submobject_positions(self, function):
for submob in self.submobjects:
submob.apply_function_to_position(function)
return self
def apply_matrix(self, matrix, **kwargs):
# Default to applying matrix about the origin, not mobjects center
if len(kwargs) == 0: