#[non_exhaustive]pub struct PointerAxes {
pub pressure: Option<f32>,
pub tangential_pressure: Option<f32>,
pub tilt: Option<(f32, f32)>,
pub twist: Option<f32>,
pub contact: Option<Size>,
}Expand description
The continuous per-sample axes a device may report beyond position.
Every field is optional because every field is optional in the hardware: a mouse reports none of them, a touchscreen usually reports a contact patch and sometimes a pressure, a good digitizer reports all five.
#[non_exhaustive]: barrel rotation, hover distance and per-axis tilt
resolution are all plausible additions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pressure: Option<f32>Normalised tip pressure, 0.0..=1.0. See
PointerInfo::effective_pressure for the value a consumer should
actually read.
tangential_pressure: Option<f32>Normalised barrel-button pressure, 0.0..=1.0 (or -1.0..=1.0 for a
device with a centred rest position), as in the W3C Pointer Events
tangentialPressure.
tilt: Option<(f32, f32)>Stylus tilt as (tilt_x, tilt_y) in degrees, each -90.0..=90.0.
twist: Option<f32>Stylus barrel rotation in degrees, 0.0..=359.0.
contact: Option<Size>The size of the contact patch in logical pixels. A finger’s ellipse; a palm’s is what a rejection heuristic reads.
Trait Implementations§
Source§impl Clone for PointerAxes
impl Clone for PointerAxes
Source§fn clone(&self) -> PointerAxes
fn clone(&self) -> PointerAxes
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more