Touch
Contains parameters of a single touch of a touch event
type Touch struct {
ClientX float64
ClientY float64
Force float64
Identifier int
RadiusX float64
RadiusY float64
RotationAngle float64
ScreenX float64
ScreenY float64
}
Member | Type | Description |
---|---|---|
ClientX | float64 |
Provides the horizontal coordinate within the application's viewport at which the event occurred |
ClientY | float64 |
Provides the vertical coordinate within the application's viewport at which the event occurred |
Force | float64 |
Is an amount of pressure being applied to the surface by the user, as a float between 0.0 (no pressure) and 1.0 (maximum pressure) |
Identifier | int |
Unique identifier for this Touch object. A given touch point (say, by a finger) will have the same identifier for the duration of its movement around the surface. This lets you ensure that you're tracking the same touch all the time |
RadiusX | float64 |
X radius of the ellipse that most closely circumscribes the area of contact with the screen. The value is in pixels of the same scale as screenX |
RadiusY | float64 |
Y radius of the ellipse that most closely circumscribes the area of contact with the screen. The value is in pixels of the same scale as screenX |
RotationAngle | float64 |
Angle (in degrees) that the ellipse described by radiusX and radiusY must be rotated, clockwise, to most accurately cover the area of contact between the user and the surface |
ScreenX | float64 |
Provides the horizontal coordinate (offset) of the touch pointer in global (screen) coordinates |
ScreenY | float64 |
Provides the vertical coordinate (offset) of the touch pointer in global (screen) coordinates |