From f89bb3e125c1063154b58f522fc8c1bed581188f Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Tue, 10 Dec 2019 13:38:30 -0800 Subject: [PATCH] Added Underline --- manimlib/mobject/shape_matchers.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/manimlib/mobject/shape_matchers.py b/manimlib/mobject/shape_matchers.py index a0f46229fc..b19f7a7563 100644 --- a/manimlib/mobject/shape_matchers.py +++ b/manimlib/mobject/shape_matchers.py @@ -72,3 +72,14 @@ def __init__(self, mobject, **kwargs): ) self.replace(mobject, stretch=True) self.set_stroke(self.stroke_color, self.stroke_width) + + +class Underline(Line): + CONFIG = { + "buff": SMALL_BUFF, + } + + def __init__(self, mobject, **kwargs): + super().__init__(LEFT, RIGHT) + self.match_width(mobject) + self.next_to(mobject, DOWN, buff=self.buff)