Creator corrected the "loupe" zoom on 2026-10-08: the click anchors a fixed
capture region (box/2 centred on the click) and the box is a live 2x view of
that region — dragging the box never changes its content; it magnifies the
fully-composited frame (every layer, incl. webcam) and draws LAST (n+1).
Rectangle shape is 4:3 ("more of a 640x480 aspect").
- MainViewModel.Zoom.cs rewritten: ActivateZoom anchors CaptureX/CaptureY
(independently clamped); UpdateZoomMove relocates the box only; the per-frame
BuildZoomFrame/ZoomFrameBuilder path is gone.
- SceneCompositor: skips the active ZoomSceneElement in every layer loop and
BlitZooms it last via the new pure ZoomMagnifier (2x bilinear, temp snapshot
via ArrayPool, round clip).
- Preview: ZoomBox hoisted above CanvasGrid as a sibling; its brush samples the
whole composed preview at the fixed capture (2x).
- Tests: ZoomMagnifierTests (box-over-blue shows green capture at 2x incl. an
extra red "layer" — the loupe/backdrop-only regressions both fail it) +
round-clip; ZoomBoxInteractionTests rewritten (anchored capture, move-doesn't-
change-capture, 4:3/9:16/square). 404 pass, 2 known environment flakes.
28 lines
869 B
C#
28 lines
869 B
C#
using System;
|
|
|
|
namespace ytLive.Models;
|
|
|
|
public class ZoomState
|
|
{
|
|
public bool IsActive { get; set; }
|
|
public double X { get; set; }
|
|
public double Y { get; set; }
|
|
public double Width { get; set; }
|
|
public double Height { get; set; }
|
|
|
|
/// <summary>Master-space top-left of the FIXED capture window (the box/2 region
|
|
/// centred on the click). The box can be dragged anywhere; this never changes —
|
|
/// the box always shows this same region magnified 2x (creator ruling 2026-10-08).</summary>
|
|
public double CaptureX { get; set; }
|
|
public double CaptureY { get; set; }
|
|
|
|
public bool IsMoving { get; set; }
|
|
public double GrabOffsetX { get; set; }
|
|
public double GrabOffsetY { get; set; }
|
|
|
|
public double Left => X;
|
|
public double Top => Y;
|
|
public double Right => X + Width;
|
|
public double Bottom => Y + Height;
|
|
}
|