pub struct NativeTouchPointF64 {
pub identifier: i32,
pub client_x: f64,
pub client_y: f64,
pub screen_x: f64,
pub screen_y: f64,
pub offset_x: f64,
pub offset_y: f64,
pub page_x: f64,
pub page_y: f64,
}Expand description
Represents a single touch point with high-precision f64 coordinates.
Used for pixel-precise interactions such as canvas drawing, where
sub-pixel accuracy matters. The identifier field distinguishes
between simultaneous touch points, enabling multi-finger gesture
tracking.
Fields§
§identifier: i32A unique identifier for this touch point.
client_x: f64The X coordinate of the touch relative to the viewport.
client_y: f64The Y coordinate of the touch relative to the viewport.
screen_x: f64The X coordinate of the touch relative to the screen.
screen_y: f64The Y coordinate of the touch relative to the screen.
offset_x: f64The X coordinate of the touch relative to the target element.
offset_y: f64The Y coordinate of the touch relative to the target element.
page_x: f64The X coordinate of the touch relative to the page.
page_y: f64The Y coordinate of the touch relative to the page.
Implementations§
Source§impl NativeTouchPointF64
Implementation of high-precision touch point extraction from DOM touch events.
impl NativeTouchPointF64
Implementation of high-precision touch point extraction from DOM touch events.
Sourcepub fn extract_all(event: &Event) -> Vec<NativeTouchPointF64>
pub fn extract_all(event: &Event) -> Vec<NativeTouchPointF64>
Extracts all active touch points with high-precision f64 offset coordinates
from a TouchEvent.
Similar to NativeTouchPoint::extract_all, but returns f64 precision for
offset/client coordinates, which is essential for canvas drawing
and other pixel-precise interactions.
§Arguments
&Event: The native DOM touch event.
§Returns
Vec<NativeTouchPointF64>: All currently active touch points withf64coordinates.
Source§impl NativeTouchPointF64
impl NativeTouchPointF64
pub fn get_identifier(&self) -> i32
pub fn get_mut_identifier(&mut self) -> &mut i32
pub fn set_identifier(&mut self, val: i32) -> &mut Self
pub fn get_client_x(&self) -> f64
pub fn get_mut_client_x(&mut self) -> &mut f64
pub fn set_client_x(&mut self, val: f64) -> &mut Self
pub fn get_client_y(&self) -> f64
pub fn get_mut_client_y(&mut self) -> &mut f64
pub fn set_client_y(&mut self, val: f64) -> &mut Self
pub fn get_screen_x(&self) -> f64
pub fn get_mut_screen_x(&mut self) -> &mut f64
pub fn set_screen_x(&mut self, val: f64) -> &mut Self
pub fn get_screen_y(&self) -> f64
pub fn get_mut_screen_y(&mut self) -> &mut f64
pub fn set_screen_y(&mut self, val: f64) -> &mut Self
pub fn get_offset_x(&self) -> f64
pub fn get_mut_offset_x(&mut self) -> &mut f64
pub fn set_offset_x(&mut self, val: f64) -> &mut Self
pub fn get_offset_y(&self) -> f64
pub fn get_mut_offset_y(&mut self) -> &mut f64
pub fn set_offset_y(&mut self, val: f64) -> &mut Self
pub fn get_page_x(&self) -> f64
pub fn get_mut_page_x(&mut self) -> &mut f64
pub fn set_page_x(&mut self, val: f64) -> &mut Self
pub fn get_page_y(&self) -> f64
pub fn get_mut_page_y(&mut self) -> &mut f64
pub fn set_page_y(&mut self, val: f64) -> &mut Self
Trait Implementations§
Source§impl Clone for NativeTouchPointF64
impl Clone for NativeTouchPointF64
Source§fn clone(&self) -> NativeTouchPointF64
fn clone(&self) -> NativeTouchPointF64
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NativeTouchPointF64
impl Debug for NativeTouchPointF64
Source§impl Default for NativeTouchPointF64
impl Default for NativeTouchPointF64
Source§fn default() -> NativeTouchPointF64
fn default() -> NativeTouchPointF64
Source§impl PartialEq for NativeTouchPointF64
impl PartialEq for NativeTouchPointF64
Source§fn eq(&self, other: &NativeTouchPointF64) -> bool
fn eq(&self, other: &NativeTouchPointF64) -> bool
self and other values to be equal, and is used by ==.