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

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.

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.

Return the current absolute x coordinate of the touch event, transformed to screen coordinates.

Arguments

  • width - The current output screen width

Return the current absolute y coordinate of the touch event, transformed to screen coordinates.

Arguments

  • height - The current output screen height

Implementors