using System.Windows.Media; namespace ytLive.Models; /// /// The transient zoom layer. It is a real scene element, but a special one: while /// active the SceneCompositor draws it LAST (layer n+1, above everything) as a live /// 2x view of a FIXED capture window (the box/2 region centred on where the creator /// clicked), sampled from the just-composited frame — so it captures ALL layers and /// keeps showing the same content no matter where the box is dragged (creator ruling /// 2026-10-08). Its X/Y/W/H are the movable BOX placement; CaptureX/CaptureY is the /// anchored capture window. While inactive it is an invisible placeholder that is /// never persisted (LayoutStore hand-rolls only Source/WebcamSceneConfig rows) — the /// VM re-inserts it on load and on scene creation, mirroring how backgrounds heal. /// public sealed class ZoomSceneElement : SceneElement { /// True only while a zoom box is live; flips Kind so the layer leaves /// the baked static base and composites per-frame. public bool IsZoomActive { get; set; } /// Master-space top-left of the fixed capture window. Set once by /// ActivateZoom; moving the box must never touch it. public double CaptureX { get; set; } public double CaptureY { get; set; } public override ElementKind Kind => IsZoomActive ? ElementKind.Dynamic : ElementKind.Static; public override bool IsZoomLayer => true; public override bool IsDraggable => false; /// Never rendered by the element template or the resolver — the preview /// magnifier (ZoomBox) and the output compositor's zoom pass own its pixels. public override ImageSource? DisplaySource => null; }