Added match_style_data method

This commit is contained in:
Grant Sanderson
2018-01-21 16:44:07 -08:00
parent c7eb88cc75
commit 5b0b754cae

View File

@ -84,6 +84,18 @@ class VMobject(Mobject):
)
return self
def match_style(self, vmobject):
#TODO: Should this be smart about matching the
#style of the family members, if they happen to
#be different?
self.set_style_data(
stroke_color = vmobject.get_stroke_color(),
stroke_width = vmobject.get_stroke_width(),
fill_color = vmobject.get_fill_color(),
fill_opacity = vmobject.get_fill_opacity(),
)
return
def fade(self, darkness = 0.5):
for submob in self.submobject_family():
submob.set_stroke(