#[repr(transparent)]pub struct SDL_PenAxis(pub c_uint);Expand description
Pen axis indices.
These are the valid values for the axis field in SDL_PenAxisEvent. All
axes are either normalised to 0..1 or report a (positive or negative) angle
in degrees, with 0.0 representing the centre. Not all pens/backends support
all axes: unsupported axes are always zero.
To convert angles for tilt and rotation into vector representation, use SDL_sinf on the XTILT, YTILT, or ROTATION component, for example:
SDL_sinf(xtilt * SDL_PI_F / 180.0).
Available Since: This enum is available since SDL 3.2.0.
Tuple Fields§
§0: c_uintImplementations§
Source§impl SDL_PenAxis
impl SDL_PenAxis
Sourcepub const SDL_PEN_AXIS_PRESSURE: SDL_PenAxis
pub const SDL_PEN_AXIS_PRESSURE: SDL_PenAxis
< Pen pressure. Unidirectional: 0 to 1.0
Sourcepub const SDL_PEN_AXIS_XTILT: SDL_PenAxis
pub const SDL_PEN_AXIS_XTILT: SDL_PenAxis
< Pen horizontal tilt angle. Bidirectional: -90.0 to 90.0 (left-to-right).
Sourcepub const SDL_PEN_AXIS_YTILT: SDL_PenAxis
pub const SDL_PEN_AXIS_YTILT: SDL_PenAxis
< Pen vertical tilt angle. Bidirectional: -90.0 to 90.0 (top-to-down).
Sourcepub const SDL_PEN_AXIS_DISTANCE: SDL_PenAxis
pub const SDL_PEN_AXIS_DISTANCE: SDL_PenAxis
< Pen distance to drawing surface. Unidirectional: 0.0 to 1.0
Sourcepub const SDL_PEN_AXIS_ROTATION: SDL_PenAxis
pub const SDL_PEN_AXIS_ROTATION: SDL_PenAxis
< Pen barrel rotation. Bidirectional: -180 to 179.9 (clockwise, 0 is facing up, -180.0 is facing down).
Sourcepub const SDL_PEN_AXIS_SLIDER: SDL_PenAxis
pub const SDL_PEN_AXIS_SLIDER: SDL_PenAxis
< Pen finger wheel or slider (e.g., Airbrush Pen). Unidirectional: 0 to 1.0
Sourcepub const SDL_PEN_AXIS_TANGENTIAL_PRESSURE: SDL_PenAxis
pub const SDL_PEN_AXIS_TANGENTIAL_PRESSURE: SDL_PenAxis
< Pressure from squeezing the pen (“barrel pressure”).
Sourcepub const SDL_PEN_AXIS_COUNT: SDL_PenAxis
pub const SDL_PEN_AXIS_COUNT: SDL_PenAxis
< Total known pen axis types in this version of SDL. This number may grow in future releases!
Trait Implementations§
Source§impl Clone for SDL_PenAxis
impl Clone for SDL_PenAxis
Source§fn clone(&self) -> SDL_PenAxis
fn clone(&self) -> SDL_PenAxis
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more