Trait input::event::touch::TouchEventPosition
[−]
[src]
pub trait TouchEventPosition: AsRaw<libinput_event_touch> {
fn x(&self) -> f64 { ... }
fn y(&self) -> f64 { ... }
fn x_transformed(&self, width: u32) -> f64 { ... }
fn y_transformed(&self, height: u32) -> f64 { ... }
}Position related functions all TouchEvents implement, that have a screen position assigned to them.
Provided Methods
fn x(&self) -> f64
Return the current absolute x coordinate of the touch event, in mm from the top left corner of the device.
To get the corresponding output screen coordinate, use x_transformed.
fn y(&self) -> f64
Return the current absolute y coordinate of the touch event, in mm from the top left corner of the device.
To get the corresponding output screen coordinate, use y_transformed.
fn x_transformed(&self, width: u32) -> f64
Return the current absolute x coordinate of the touch event, transformed to screen coordinates.
Arguments
- width - The current output screen width
fn y_transformed(&self, height: u32) -> f64
Return the current absolute y coordinate of the touch event, transformed to screen coordinates.
Arguments
- height - The current output screen height
Implementors
impl TouchEventPosition for TouchDownEventimpl TouchEventPosition for TouchMotionEvent