mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 14:03:59 +08:00
Reimplented svg rendering using cairo, and changed vmobject color model to allow for gradeints and strokes with opacities. Many errors associated with python 2 to python 3 conversion are likely still present at this point.
This commit is contained in:
@ -1,11 +1,17 @@
|
||||
|
||||
import os
|
||||
import hashlib
|
||||
|
||||
from constants import TEX_DIR
|
||||
from constants import TEX_TEXT_TO_REPLACE
|
||||
|
||||
|
||||
def tex_hash(expression, template_tex_file):
|
||||
return str(hash(expression + template_tex_file))
|
||||
id_str = str(expression + template_tex_file)
|
||||
hasher = hashlib.sha256()
|
||||
hasher.update(id_str.encode())
|
||||
# Truncating at 16 bytes for cleanliness
|
||||
return hasher.hexdigest()[:16]
|
||||
|
||||
|
||||
def tex_to_svg_file(expression, template_tex_file):
|
||||
|
Reference in New Issue
Block a user