summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-10-24 14:41:51 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-01-04 09:57:57 +1000
commit5d0470738125243c98f7a8cc40d62f53604a8051 (patch)
treea829cea9a16188d2c9315c9d0b95ed7919d3fbc2 /include
parentf65a5c50224efc34414f44c86700e15392b7039b (diff)
Implement stylus pressure curve support
Takes a 4-point cubic bezier curve as input and maps the pressure coordinates to the values outlined by this curve. This is an extension of the current implementation in the xf86-input-wacom driver which only allows the two center control points to be modified. Over the years a few users have noted that the wacom driver's pressure curve makes it impossible to cap the pressure at a given value. Given our bezier implementation here, it's effectively a freebie to add configurability of the first and last control points. We do require all control points' x coordinates to be in ascending order. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include')
-rw-r--r--include/libinput-properties.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/libinput-properties.h b/include/libinput-properties.h
index 8c6942d..f76500f 100644
--- a/include/libinput-properties.h
+++ b/include/libinput-properties.h
@@ -183,4 +183,11 @@
/* Device rotation: FLOAT, 1 value, 32 bit, read-only */
#define LIBINPUT_PROP_ROTATION_ANGLE_DEFAULT "libinput Rotation Angle Default"
+/* Tablet tool pressure curve: float, 8 values, 32 bit
+ * Value range is [0.0, 1.0], the values specify the x/y of the four
+ * control points for a cubic bezier curve.
+ * Default value: 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0
+ */
+#define LIBINPUT_PROP_TABLET_TOOL_PRESSURECURVE "libinput Tablet Tool Pressurecurve"
+
#endif /* _LIBINPUT_PROPERTIES_H_ */