RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
Loading...
Searching...
No Matches
rmgui_gesture_result_t Struct Reference

Signed Q16 values use 65536 units per pixel/scale/turn. More...

#include <gesture.h>

Data Fields

unsigned flags
uint32_t id
int64_t x_q16
int64_t y_q16
int64_t dx_q16
int64_t dy_q16
int64_t scale_q16
int64_t rotation_q16

Detailed Description

Signed Q16 values use 65536 units per pixel/scale/turn.

x/y are the single-contact position or the two-contact midpoint; dx/dy are translation from the down position or initial midpoint (not from the previous call). scale is distance / initial distance, and rotation is the shortest signed turn from the initial vector, in [-32768,32768). Screen-positive y means positive rotation is clockwise. Pinch uses the first two contacts; id is the first contact's ID. Non-pinch scale is 65536 and rotation is zero. Combined transition flags describe the new pinch geometry. At coincident positions an active pinch reports scale/rotation zero. Fractional results truncate toward zero; lengths use normalized integer square root. Flags zero means no recognized result; other members are then unspecified. Integer square root and CORDIC make results identical on native and wasm.

Field Documentation

◆ flags

unsigned rmgui_gesture_result_t::flags

◆ id

uint32_t rmgui_gesture_result_t::id

◆ x_q16

int64_t rmgui_gesture_result_t::x_q16

◆ y_q16

int64_t rmgui_gesture_result_t::y_q16

◆ dx_q16

int64_t rmgui_gesture_result_t::dx_q16

◆ dy_q16

int64_t rmgui_gesture_result_t::dy_q16

◆ scale_q16

int64_t rmgui_gesture_result_t::scale_q16

◆ rotation_q16

int64_t rmgui_gesture_result_t::rotation_q16

The documentation for this struct was generated from the following file: