pub struct InteractiveViewer<W: Widget + Send + Sync + 'static> {
pub child: W,
/* private fields */
}Expand description
A large 2D plane with pan + zoom, driven by wheel/drag and +/- controls
(Flutter-InteractiveViewer-like, Phase 32/D115).
Built on the same GPU-composited transform-layer seam ScrollView uses
(D087/D090): the child is recorded ONCE into an independent Picture
and replayed by the platform into its own content texture, so panning is
a zero-repaint UV shift. Zoom rasterizes that SAME picture at a higher
physical resolution (content_scale = dpi_scale * zoom in
rosace/src/engine.rs) — real GPU-crisp magnification, reusing the exact
mechanism that already gives HiDPI displays sharp text/shapes; the
compositor’s existing UV-window math needs no changes.
Pinch/trackpad-magnify gesture support is a NAMED deferral (mirrors the
project’s existing “mobile pinch deferred” pattern for Phase 28 Step 6):
this MVP drives zoom through explicit +/- controls, which needs no
new platform-level gesture plumbing.
Fields§
§child: WImplementations§
Trait Implementations§
Source§impl<W: Widget + Send + Sync + 'static> Widget for InteractiveViewer<W>
impl<W: Widget + Send + Sync + 'static> Widget for InteractiveViewer<W>
Source§fn layout(&self, ctx: &LayoutCtx<'_>) -> Size
fn layout(&self, ctx: &LayoutCtx<'_>) -> Size
ctx.constraints and return a size within them. Read more