pub struct TabletToolData {
pub force: Option<Force>,
pub tangential_force: Option<f32>,
pub twist: Option<u16>,
pub tilt: Option<TabletToolTilt>,
pub angle: Option<TabletToolAngle>,
}Fields§
§force: Option<Force>The force applied to the tool against the surface.
When the force information is not available, None is returned.
§Platform-specific
Web: Has no mechanism to detect support, so this will always be Some.
tangential_force: Option<f32>Represents normalized tangential pressure, also known as barrel pressure. In the range of
-1 to 1. 0 means no tangential pressure is applied. None means backend or device has no
support.
§Platform-specific
Web: Has no mechanism to detect support, so this will always be Some with a value
of 0.
twist: Option<u16>The clockwise rotation in degrees of a tool around its own major axis. E.g. twisting a pen
around its length. In the range of 0 to 359. None means backend or device has no
support.
§Platform-specific
Web: Has no mechanism to detect support, so this will always be Some with a value
of 0.
tilt: Option<TabletToolTilt>The plane angle in degrees. None means backend or device has no support.
§Platform-specific
Web: Has no mechanism to detect support, so this will always be Some with default
values.
angle: Option<TabletToolAngle>The angular position in radians. None means backend or device has no support.
§Platform-specific
Web: Has no mechanism to detect device support, so this will always be Some with
default values unless browser support is lacking.
Implementations§
Source§impl TabletToolData
impl TabletToolData
Sourcepub fn tilt(self) -> Option<TabletToolTilt>
pub fn tilt(self) -> Option<TabletToolTilt>
Returns TabletToolTilt if present or calculates it from TabletToolAngle.
Sourcepub fn angle(self) -> Option<TabletToolAngle>
pub fn angle(self) -> Option<TabletToolAngle>
Returns TabletToolAngle if present or calculates it from TabletToolTilt.