Struct TabletToolData
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§
§impl TabletToolData
impl TabletToolData
pub fn tilt(self) -> Option<TabletToolTilt>
pub fn tilt(self) -> Option<TabletToolTilt>
Returns TabletToolTilt if present or calculates it from TabletToolAngle.
pub fn angle(self) -> Option<TabletToolAngle>
pub fn angle(self) -> Option<TabletToolAngle>
Returns TabletToolAngle if present or calculates it from TabletToolTilt.
Trait Implementations§
§impl Clone for TabletToolData
impl Clone for TabletToolData
§fn clone(&self) -> TabletToolData
fn clone(&self) -> TabletToolData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for TabletToolData
impl Debug for TabletToolData
§impl Default for TabletToolData
impl Default for TabletToolData
§fn default() -> TabletToolData
fn default() -> TabletToolData
§impl PartialEq for TabletToolData
impl PartialEq for TabletToolData
impl StructuralPartialEq for TabletToolData
Auto Trait Implementations§
impl Freeze for TabletToolData
impl RefUnwindSafe for TabletToolData
impl Send for TabletToolData
impl Sync for TabletToolData
impl Unpin for TabletToolData
impl UnwindSafe for TabletToolData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.