mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 12:32:36 +08:00
Remoe height defaults form __init__args of SingleStringTex and String
This commit is contained in:
@ -51,10 +51,11 @@ class StringMobject(SVGMobject, ABC):
|
|||||||
so that each submobject of the original `SVGMobject` will be labelled
|
so that each submobject of the original `SVGMobject` will be labelled
|
||||||
by the color of its paired submobject from the additional `SVGMobject`.
|
by the color of its paired submobject from the additional `SVGMobject`.
|
||||||
"""
|
"""
|
||||||
|
height = None
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
string: str,
|
string: str,
|
||||||
height: float | None = None,
|
|
||||||
fill_color: ManimColor = WHITE,
|
fill_color: ManimColor = WHITE,
|
||||||
stroke_color: ManimColor = WHITE,
|
stroke_color: ManimColor = WHITE,
|
||||||
stroke_width: float = 0,
|
stroke_width: float = 0,
|
||||||
@ -75,7 +76,6 @@ class StringMobject(SVGMobject, ABC):
|
|||||||
|
|
||||||
self.parse()
|
self.parse()
|
||||||
super().__init__(
|
super().__init__(
|
||||||
height=height,
|
|
||||||
stroke_color=stroke_color,
|
stroke_color=stroke_color,
|
||||||
fill_color=fill_color,
|
fill_color=fill_color,
|
||||||
stroke_width=stroke_width,
|
stroke_width=stroke_width,
|
||||||
|
@ -25,6 +25,8 @@ SCALE_FACTOR_PER_FONT_POINT = 0.001
|
|||||||
|
|
||||||
|
|
||||||
class SingleStringTex(SVGMobject):
|
class SingleStringTex(SVGMobject):
|
||||||
|
height: float | None = None
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
tex_string: str,
|
tex_string: str,
|
||||||
@ -60,6 +62,7 @@ class SingleStringTex(SVGMobject):
|
|||||||
fill_color=fill_color,
|
fill_color=fill_color,
|
||||||
fill_opacity=fill_opacity,
|
fill_opacity=fill_opacity,
|
||||||
stroke_width=stroke_width,
|
stroke_width=stroke_width,
|
||||||
|
path_string_config=path_string_config,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user