From 723282eb56e468fc131307e2602dc290d406ac2b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 12 Jan 2018 16:18:20 +1000 Subject: [PATCH] wacom: make the stroke object more generic, less SVG --- tuhi/wacom.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tuhi/wacom.py b/tuhi/wacom.py index 910dc0e..597ce93 100644 --- a/tuhi/wacom.py +++ b/tuhi/wacom.py @@ -68,15 +68,19 @@ class NordicData(list): self.opcode = bs[0] self.length = bs[1] + class Stroke(object): + RELATIVE = 1 + ABSOLUTE = 2 + def __init__(self): self.points = [] def add_pos(self, x, y): - self.points.append(('M', x, y)) + self.points.append((Stroke.ABSOLUTE, x, y)) def add_rel(self, x, y, p=None): - self.points.append(('l', x, y, p)) + self.points.append((Stroke.RELATIVE, x, y, p)) class Drawing(list):