mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Add shorted method for setting background stroke
This commit is contained in:
parent
21bf3c3e3a
commit
c2feb6fff1
1 changed files with 5 additions and 3 deletions
|
@ -25,10 +25,8 @@ class TexSymbol(VMobjectFromSVGPathstring):
|
||||||
class SingleStringTexMobject(SVGMobject):
|
class SingleStringTexMobject(SVGMobject):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"template_tex_file_body": TEMPLATE_TEX_FILE_BODY,
|
"template_tex_file_body": TEMPLATE_TEX_FILE_BODY,
|
||||||
"stroke_width": 0,
|
|
||||||
"fill_opacity": 1.0,
|
"fill_opacity": 1.0,
|
||||||
"background_stroke_width": 1,
|
"stroke_width": 0,
|
||||||
"background_stroke_color": BLACK,
|
|
||||||
"should_center": True,
|
"should_center": True,
|
||||||
"height": None,
|
"height": None,
|
||||||
"organize_left_to_right": False,
|
"organize_left_to_right": False,
|
||||||
|
@ -233,6 +231,10 @@ class TexMobject(SingleStringTexMobject):
|
||||||
self.set_color_by_tex(tex, color, **kwargs)
|
self.set_color_by_tex(tex, color, **kwargs)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
def set_bstroke(self, color=BLACK, width=4):
|
||||||
|
self.set_stroke(color, width, background=True)
|
||||||
|
return self
|
||||||
|
|
||||||
def index_of_part(self, part):
|
def index_of_part(self, part):
|
||||||
split_self = self.split()
|
split_self = self.split()
|
||||||
if part not in split_self:
|
if part not in split_self:
|
||||||
|
|
Loading…
Add table
Reference in a new issue