wacom: make the stroke object more generic, less SVG

This commit is contained in:
Peter Hutterer 2018-01-12 16:18:20 +10:00
parent d214778a1c
commit 723282eb56
1 changed files with 6 additions and 2 deletions

View File

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