mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Added match_style_data method
This commit is contained in:
parent
c7eb88cc75
commit
5b0b754cae
1 changed files with 12 additions and 0 deletions
|
@ -84,6 +84,18 @@ class VMobject(Mobject):
|
||||||
)
|
)
|
||||||
return self
|
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):
|
def fade(self, darkness = 0.5):
|
||||||
for submob in self.submobject_family():
|
for submob in self.submobject_family():
|
||||||
submob.set_stroke(
|
submob.set_stroke(
|
||||||
|
|
Loading…
Add table
Reference in a new issue