mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Fix match_style
This commit is contained in:
parent
9483f26a3b
commit
5f878a2c1a
2 changed files with 8 additions and 2 deletions
|
@ -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):
|
||||
|
|
|
@ -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(),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue