5.2 KiB
5.2 KiB
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. |
|
false |
Vergrootglas bij het kiezen van een gebied (1.1.5)
Starting point
- kniip has no magnifier yet. The snip overlay src/Kniip/Capture/RegionCaptureWindow.xaml shows a frozen screenshot (
Frozen), a dim layer, the selection and aW × Hbadge. - The screencast selector src/Kniip/Recording/RegionSelectorWindow.xaml is a transparent overlay over the live screen. It has no image to zoom into.
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
- Setting: in src/Kniip/Settings/AppSettings.cs add
public bool ShowMagnifier { get; set; } = true;with a Dutch doc comment. - 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
Imageof the frozen bitmap withNearestNeighborscaling. ACroppedBitmapof 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
SizeBadgewithX: … 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.
- A round clipped area (about 130 DIP) showing an
- Snip overlay src/Kniip/Capture/RegionCaptureWindow.xaml.cs:
- Add a constructor parameter
bool showMagnifierand 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 onMouseLeave. - src/Kniip/App.xaml.cs
BeginSnippassesSettings.ShowMagnifier.
- Add a constructor parameter
- Screencast selector src/Kniip/Recording/RegionSelectorWindow.xaml.cs:
- Add an optional
BitmapSource? frozenconstructor parameter. When it is set, the same magnifier runs inOnMouseMove(also while hovering over windows, because you can drag from there). - src/Kniip/Recording/RecordingController.cs
BeginSelection: if_settings.ShowMagnifieris on, callScreenGrabber.Capture(screen.Bounds)per screen before the selectors are shown, so the overlay is not in the image. Otherwise passnull.
- Add an optional
- 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 toLoadFrom(around line 100) and to the save step (around line 444). - Release 1.1.5:
- CHANGELOG.md gets a new section
## 1.1.5 - 2026-11-09with 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", tag1.1.5and push, the same way as 1.1.4. You create the release on git.hibbit.net yourself; I'll supply the changelog text.
- CHANGELOG.md gets a new section