gui: handle the now-normalized pressure range
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
3c3163261f
commit
6b623132e5
|
@ -66,7 +66,8 @@ class JsonSvg(GObject.Object):
|
|||
elif self.orientation == 'reverse-landscape':
|
||||
x, y = width - x, height - y
|
||||
|
||||
delta = (p['pressure'] - 1000.0) / 1000.0
|
||||
# Pressure normalized range is [0, 0xffff]
|
||||
delta = (p['pressure'] - 0x8000) / 0x8000
|
||||
stroke_width = 0.4 + 0.20 * delta
|
||||
points_with_sk_width.append((x, y, stroke_width))
|
||||
|
||||
|
|
Loading…
Reference in New Issue