Files
kniip/.cursor/plans/vergrootglas_bij_selectie_eaef4448.plan.md
rogierandCursor 6d19b91963 1.1.5
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-09 17:32:50 +01:00

5.2 KiB
Raw Permalink Blame History

name, overview, todos, isProject
name overview todos isProject
Vergrootglas bij selectie Add a magnifier (circular zoom with crosshair and X/Y coordinates near the cursor) to the snip overlay and the screencast region selector, with a settings checkbox that is on by default. Release as 1.1.5.
id content status
setting ShowMagnifier (default true) toevoegen aan AppSettings completed
id content status
control MagnifierControl maken: ronde zoom, raster, kruisdraad, X/Y-badge, plaatsing bij cursor met randcorrectie completed
id content status
snip Vergrootglas in RegionCaptureWindow + doorgeven vanuit App.BeginSnip completed
id content status
screencast Vergrootglas in RegionSelectorWindow met vooraf vastgelegd beeld vanuit RecordingController.BeginSelection completed
id content status
settings-ui Checkbox in SettingsWindow (tab Sneltoetsen) laden en opslaan completed
id content status
release CHANGELOG 1.1.5, README, versienummers, build.ps1 draaien, commit/tag 1.1.5 en pushen completed
false

Vergrootglas bij het kiezen van een gebied (1.1.5)

Starting point

Approach

flowchart LR
    Settings["AppSettings.ShowMagnifier"] --> App["App.BeginSnip"]
    Settings --> Rec["RecordingController.BeginSelection"]
    App -->|"frozen image + flag"| Snip[RegionCaptureWindow]
    Rec -->|"capture per screen + flag"| Sel[RegionSelectorWindow]
    Snip --> Mag[MagnifierControl]
    Sel --> Mag
  1. Setting: in src/Kniip/Settings/AppSettings.cs add public bool ShowMagnifier { get; set; } = true; with a Dutch doc comment.
  2. Shared control: new src/Kniip/Capture/MagnifierControl.xaml(.cs) (UserControl, IsHitTestVisible="False"), styled like the screenshot:
    • A round clipped area (about 130 DIP) showing an Image of the frozen bitmap with NearestNeighbor scaling. A CroppedBitmap of about 15x15 physical pixels around the cursor is enlarged around 8x.
    • A pixel grid, a blue crosshair through the center pixel and a small square on the center pixel. The crosshair uses AccentBrush, the ring is white with a shadow.
    • Below the circle, a badge in the same style as SizeBadge with X: … Y: … in physical screen coordinates.
    • Method Update(BitmapSource frozen, System.Drawing.Point physicalRelative, System.Drawing.Point screenPoint). Pixels outside the image are left black.
    • Placement: bottom-right of the cursor at about 20 DIP offset. It flips left and/or up near the screen edge.
  3. Snip overlay src/Kniip/Capture/RegionCaptureWindow.xaml.cs:
    • Add a constructor parameter bool showMagnifier and add <local:MagnifierControl x:Name="Magnifier" Visibility="Collapsed"/> to the Grid.
    • In OnMouseMove, update and show the magnifier while it is on (before and during dragging). Not in window-pick mode (PicksWindow), because exact pixels don't matter there. Hide it on MouseLeave.
    • src/Kniip/App.xaml.cs BeginSnip passes Settings.ShowMagnifier.
  4. Screencast selector src/Kniip/Recording/RegionSelectorWindow.xaml.cs:
    • Add an optional BitmapSource? frozen constructor parameter. When it is set, the same magnifier runs in OnMouseMove (also while hovering over windows, because you can drag from there).
    • src/Kniip/Recording/RecordingController.cs BeginSelection: if _settings.ShowMagnifier is on, call ScreenGrabber.Capture(screen.Bounds) per screen before the selectors are shown, so the overlay is not in the image. Otherwise pass null.
  5. Settings screen src/Kniip/Settings/SettingsWindow.xaml tab Sneltoetsen: below the hotkeys, add a card title "Gebied kiezen" with <CheckBox x:Name="MagnifierBox" Content="Vergrootglas tonen bij het kiezen van een gebied (knipsel en screencast)" />. In SettingsWindow.xaml.cs, add a line to LoadFrom (around line 100) and to the save step (around line 444).
  6. Release 1.1.5:
    • CHANGELOG.md gets a new section ## 1.1.5 - 2026-11-09 with a Nieuw entry for the magnifier (round zoom with crosshair and X/Y, for both snips and screencasts) and how to turn it off.
    • README.md: the version table and build comment go to 1.1.5.
    • Version 1.1.4 becomes 1.1.5 in build.ps1, installer/Kniip.iss and src/Kniip/Kniip.csproj.
    • Run .\build.ps1, then commit "1.1.5", tag 1.1.5 and push, the same way as 1.1.4. You create the release on git.hibbit.net yourself; I'll supply the changelog text.