mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Add deprication warning
This commit is contained in:
parent
f11ab03112
commit
d2518df82c
1 changed files with 5 additions and 2 deletions
|
@ -12,6 +12,9 @@ from manimlib.utils.config_ops import digest_config
|
||||||
TEXT_MOB_SCALE_FACTOR = 0.05
|
TEXT_MOB_SCALE_FACTOR = 0.05
|
||||||
|
|
||||||
|
|
||||||
|
# Warning, these classes are currently based on an old rendering mode
|
||||||
|
# not supported in this version of manim
|
||||||
|
|
||||||
class TextSetting(object):
|
class TextSetting(object):
|
||||||
def __init__(self, start, end, font, slant, weight, line_num=-1):
|
def __init__(self, start, end, font, slant, weight, line_num=-1):
|
||||||
self.start = start
|
self.start = start
|
||||||
|
@ -205,7 +208,7 @@ class Text(SVGMobject):
|
||||||
|
|
||||||
dir_name = consts.TEXT_DIR
|
dir_name = consts.TEXT_DIR
|
||||||
hash_name = self.text2hash()
|
hash_name = self.text2hash()
|
||||||
file_name = os.path.join(dir_name, hash_name)+'.svg'
|
file_name = os.path.join(dir_name, hash_name) +'.svg'
|
||||||
if os.path.exists(file_name):
|
if os.path.exists(file_name):
|
||||||
return file_name
|
return file_name
|
||||||
|
|
||||||
|
@ -227,7 +230,7 @@ class Text(SVGMobject):
|
||||||
if setting.line_num != last_line_num:
|
if setting.line_num != last_line_num:
|
||||||
offset_x = 0
|
offset_x = 0
|
||||||
last_line_num = setting.line_num
|
last_line_num = setting.line_num
|
||||||
context.move_to(START_X + offset_x, START_Y + lsh*setting.line_num)
|
context.move_to(START_X + offset_x, START_Y + lsh * setting.line_num)
|
||||||
context.show_text(text)
|
context.show_text(text)
|
||||||
offset_x += context.text_extents(text)[4]
|
offset_x += context.text_extents(text)[4]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue