pub struct PointerData { /* private fields */ }Implementations§
Source§impl PointerData
impl PointerData
Source§impl PointerData
impl PointerData
Sourcepub fn pointer_id(&self) -> i32
pub fn pointer_id(&self) -> i32
Gets the unique identifier of the pointer causing the event.
Sourcepub fn width(&self) -> f64
pub fn width(&self) -> f64
Gets the width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.
Sourcepub fn height(&self) -> f64
pub fn height(&self) -> f64
Gets the height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.
Sourcepub fn pressure(&self) -> f32
pub fn pressure(&self) -> f32
Gets the normalized pressure of the pointer input in the range of 0 to 1,
Sourcepub fn tangential_pressure(&self) -> f32
pub fn tangential_pressure(&self) -> f32
Gets the normalized tangential pressure of the pointer input (also known as barrel pressure or cylinder stress) in the range -1 to 1,
Sourcepub fn tilt_x(&self) -> i32
pub fn tilt_x(&self) -> i32
Gets the plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.
Sourcepub fn tilt_y(&self) -> i32
pub fn tilt_y(&self) -> i32
Gets the plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.
Sourcepub fn twist(&self) -> i32
pub fn twist(&self) -> i32
Gets the clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, with a value in the range 0 to 359.The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, with a value in the range 0 to 359.
Sourcepub fn pointer_type(&self) -> String
pub fn pointer_type(&self) -> String
Gets the device type that caused the event (mouse, pen, touch, etc.).
Sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
Gets if the pointer represents the primary pointer of this pointer type.
Trait Implementations§
Source§impl Debug for PointerData
impl Debug for PointerData
Source§impl<'de> Deserialize<'de> for PointerData
Available on crate feature serialize only.
impl<'de> Deserialize<'de> for PointerData
serialize only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl From<&PlatformEventData> for PointerData
impl From<&PlatformEventData> for PointerData
Source§fn from(val: &PlatformEventData) -> Self
fn from(val: &PlatformEventData) -> Self
Source§impl From<&PointerData> for SerializedPointerData
Available on crate feature serialize only.
impl From<&PointerData> for SerializedPointerData
serialize only.