mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Have TexMobject keep track of font_size
This commit is contained in:
parent
5b88d2347c
commit
e19ceaaff0
1 changed files with 5 additions and 0 deletions
|
@ -48,6 +48,7 @@ class Tex(StringMobject):
|
||||||
if not tex_string.strip():
|
if not tex_string.strip():
|
||||||
tex_string = R"\\"
|
tex_string = R"\\"
|
||||||
|
|
||||||
|
self.font_size = font_size
|
||||||
self.tex_string = tex_string
|
self.tex_string = tex_string
|
||||||
self.alignment = alignment
|
self.alignment = alignment
|
||||||
self.template = template
|
self.template = template
|
||||||
|
@ -86,6 +87,10 @@ class Tex(StringMobject):
|
||||||
content, self.template, self.additional_preamble, self.tex_string
|
content, self.template, self.additional_preamble, self.tex_string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def _handle_scale_side_effects(self, scale_factor: float) -> Self:
|
||||||
|
self.font_size *= scale_factor
|
||||||
|
return self
|
||||||
|
|
||||||
# Parsing
|
# Parsing
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Loading…
Add table
Reference in a new issue