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:
Grant Sanderson
2018-08-10 15:12:49 -07:00
parent 858051a806
commit 087715e538
7 changed files with 296 additions and 204 deletions

View File

@ -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):