gui: handle the now-normalized pressure range

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
pull/145/head
Peter Hutterer 2019-07-19 13:52:04 +10:00
parent 3c3163261f
commit 6b623132e5
1 changed files with 2 additions and 1 deletions

View File

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