Skip to content

Commit

Permalink
Add default border width to StringMobject
Browse files Browse the repository at this point in the history
  • Loading branch information
3b1b committed Nov 6, 2023
1 parent 17cd597 commit 246a010
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions manimlib/mobject/svg/string_mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __init__(
self,
string: str,
fill_color: ManimColor = WHITE,
fill_border_width: float = 0.5,
stroke_color: ManimColor = WHITE,
stroke_width: float = 0,
base_color: ManimColor = WHITE,
Expand All @@ -65,12 +66,10 @@ def __init__(
self.use_labelled_svg = use_labelled_svg

self.parse()
super().__init__(
stroke_color=stroke_color,
fill_color=fill_color,
stroke_width=stroke_width,
**kwargs
)
super().__init__(**kwargs)
self.set_stroke(stroke_color, stroke_width)
self.set_fill(fill_color, border_width=fill_border_width)
self.note_changed_stroke()
self.labels = [submob.label for submob in self.submobjects]

def get_file_path(self, is_labelled: bool = False) -> str:
Expand Down

0 comments on commit 246a010

Please sign in to comment.