wacom: make the stroke object more generic, less SVG
This commit is contained in:
parent
d214778a1c
commit
723282eb56
|
@ -68,15 +68,19 @@ class NordicData(list):
|
||||||
self.opcode = bs[0]
|
self.opcode = bs[0]
|
||||||
self.length = bs[1]
|
self.length = bs[1]
|
||||||
|
|
||||||
|
|
||||||
class Stroke(object):
|
class Stroke(object):
|
||||||
|
RELATIVE = 1
|
||||||
|
ABSOLUTE = 2
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.points = []
|
self.points = []
|
||||||
|
|
||||||
def add_pos(self, x, y):
|
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):
|
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):
|
class Drawing(list):
|
||||||
|
|
Loading…
Reference in New Issue