Adjust Underline configuration

This commit is contained in:
Grant Sanderson 2024-03-21 09:59:29 -03:00
parent 7db69e32aa
commit b26feb7045

View file

@ -118,17 +118,13 @@ class Underline(Line):
mobject: Mobject,
buff: float = SMALL_BUFF,
stroke_color=WHITE,
stroke_width: float | Sequence[float] = [0, 3, 3, 0],
stroke_width: float | Sequence[float] = [0, 2, 3, 3, 2, 0],
stretch_factor=1.2,
**kwargs
):
super().__init__(
LEFT, RIGHT,
stroke_color=stroke_color,
stroke_width=stroke_width,
**kwargs
)
self.insert_n_curves(30)
super().__init__(LEFT, RIGHT, **kwargs)
if not isinstance(stroke_width, (float, int)):
self.insert_n_curves(len(stroke_width) - 2)
self.set_stroke(stroke_color, stroke_width)
self.set_width(mobject.get_width() * stretch_factor)
self.next_to(mobject, DOWN, buff=buff)