Skip to main content

Module pinch

Module pinch 

Source
Expand description

Two-finger gestures: pinch and rotate.

plan turns a request into the frames to send. It works in logical points and normalizes each axis on its own at the end, so a circle stays round on a tall screen, and it does no I/O. [play] sends the frames and always lifts the pair afterwards, also when a frame failed.

Structs§

Plan
Spec
What to do, in logical points.

Constants§

MAX_ROTATE
MAX_SCALE
MIN_SCALE

Functions§

check_motion
Whether the motion asks for anything the gesture can do.
plan
The frames for spec, or why there is no room for them. Nothing has been sent at that point. When the fingers would leave the margin the whole motion is made smaller, never clamped point by point, so the ratio between the two spans stays what was asked for.