Expand description
The viewport widget: draws a view of an image and turns gestures into
changes of the View, reported as Signals.
Experimental: may change in any release
(docs/stability.md).
The application owns the view (per window or per document) and the
ViewportState (what the widget keeps between frames, its hooks
included). Every change the widget makes goes through the
before_view hook and is reported as a signal with its phase, so an
application that keeps the view in a store records a pan as one
gesture, and a cancelled pan as nothing.
Structs§
- Viewport
- The viewport widget, built per frame.
- Viewport
Output - What a frame of the viewport gives back.
- Viewport
State - What the widget keeps between frames. One per viewport; the application owns it.
Enums§
- Compare
- Before and after: what the viewport shows of the “before” image.
- Phase
- Where a change stands in its gesture (shared with every image
canvas,
egui_pop_core::pointer::view). Where a change stands in its gesture. - Signal
- What the viewport tells the application.
Constants§
- GRID_
FROM_ ZOOM - From this zoom up, the pixel grid shows (when enabled).
Functions§
- readout_
text - The readout’s text: the
on_readouthook’s, or the pixel and its values. - zoom_
percent - The zoom of a view as shown, in percent (fit resolved by
mapping).