|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
Platform-specific render-pane pinch gesture capture. On macOS this installs a local magnify-event monitor and feeds synthetic zoom scroll events into the existing editor queue. More...
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Functions | |
| double | donner::editor::PinchMagnificationToScrollDelta (double magnification, double wheelZoomStep) |
| Convert an NSEvent magnification delta into the equivalent vertical scroll delta for the existing wheel-zoom model. | |
| bool | donner::editor::InstallPinchEventMonitor (GLFWwindow *window, std::vector< RenderPaneScrollEvent > *events, double wheelZoomStep) |
| Install the native pinch monitor for the editor window. | |
Platform-specific render-pane pinch gesture capture. On macOS this installs a local magnify-event monitor and feeds synthetic zoom scroll events into the existing editor queue.
|
nodiscard |
Install the native pinch monitor for the editor window.
On macOS this registers an NSEventMaskMagnify local monitor that pushes synthetic zoom-marked scroll events into events. Other platforms provide a stub that returns false.
| window | GLFW window that owns the render pane. |
| events | Scroll-event queue drained by the render pane each frame. |
| wheelZoomStep | Multiplicative zoom step per +1.0 scroll unit. |
|
nodiscard |
Convert an NSEvent magnification delta into the equivalent vertical scroll delta for the existing wheel-zoom model.
The classifier interprets zoom as pow(wheelZoomStep, scrollDeltaY). Pinch magnification instead reports the multiplicative zoom delta as 1 + magnification, so this helper computes the inverse mapping.
| magnification | Cocoa magnification delta (e.g. 0.2 for 20% pinch-out). |
| wheelZoomStep | Multiplicative zoom step per +1.0 scroll unit. |