Fix match_style

This commit is contained in:
Grant Sanderson 2021-10-03 10:27:06 -07:00
parent 9483f26a3b
commit 5f878a2c1a
2 changed files with 8 additions and 2 deletions

View file

@ -130,7 +130,7 @@ class DecimalNumber(VMobject):
def set_value(self, number):
move_to_point = self.get_edge_center(self.edge_to_fix)
old_submobjects = self.submobjects
old_submobjects = list(self.submobjects)
self.set_submobjects_from_number(number)
self.move_to(move_to_point, self.edge_to_fix)
for sm1, sm2 in zip(self.submobjects, old_submobjects):

View file

@ -149,6 +149,7 @@ class VMobject(Mobject):
stroke_opacity=None,
stroke_rgba=None,
stroke_width=None,
stroke_background=True,
gloss=None,
shadow=None,
recurse=True):
@ -163,13 +164,17 @@ class VMobject(Mobject):
if stroke_rgba is not None:
self.data['stroke_rgba'] = resize_with_interpolation(stroke_rgba, len(fill_rgba))
self.set_stroke(width=stroke_width)
self.set_stroke(
width=stroke_width,
background=stroke_background,
)
else:
self.set_stroke(
color=stroke_color,
width=stroke_width,
opacity=stroke_opacity,
recurse=recurse,
background=stroke_background,
)
if gloss is not None:
@ -183,6 +188,7 @@ class VMobject(Mobject):
"fill_rgba": self.data['fill_rgba'],
"stroke_rgba": self.data['stroke_rgba'],
"stroke_width": self.data['stroke_width'],
"stroke_background": self.draw_stroke_behind_fill,
"gloss": self.get_gloss(),
"shadow": self.get_shadow(),
}