tools: use the json file timestamp where the strokes have none
Cause for the issue in #179 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
06aa5b05b1
commit
6c0507abe6
|
@ -61,12 +61,15 @@ def parse_file(filename, tablet_model, orientation):
|
|||
return
|
||||
|
||||
f = StrokeFile(data)
|
||||
# Spark doesn't have timestamps in the strokes, so use the file
|
||||
# timestamp itself
|
||||
timestamp = f.timestamp or yml['time']
|
||||
# gotta convert to Drawings, then to json string, then to json, then
|
||||
# to svg. ffs.
|
||||
svgname = f'{stem}.svg'
|
||||
jsonname = f'{stem}.json'
|
||||
ps = 5 # FIXME: fetch the point size from the settings.ini
|
||||
d = Drawing(svgname, (width * ps, height * ps), f.timestamp)
|
||||
d = Drawing(svgname, (width * ps, height * ps), timestamp)
|
||||
|
||||
def normalize(p):
|
||||
NORMALIZED_RANGE = 0x10000
|
||||
|
|
Loading…
Reference in New Issue