MCDE dtphoto: every menu path bound, the View switches drawn and read

All 206 paths of dtphoto.menu resolve to a command the callback switches
on.  The table had 43 doubled entries and 11 paths that named a menu
entry the menu does not have ("Image/Adjust/Image Size..." instead of
"Image/Image Size...", "@3.0" tags the reader already strips); both are
gone, CommandOf walks the table to its NULL entry, and -menutest now
proves the table against itself: 206 paths, 0 doubled, 0 bad, and an
unknown path stays CMD_NONE.  DTPHOTO_CMDS=1 used to bind 38, now 206,
none on CMD_NONE.

The View switches were flags nobody read.  SnapX/SnapY pull a marquee or
crop drag onto the grid or a guide a guide in reach wins over the grid,
Lock Guides refuses new and keeps existing ones), DrawGuides paints the
grid, the guides and the rulers on the canvas and not into the picture.

Two new headless tests, both green on depth 24 and depth 8:
  -viewtest  snapping arithmetic: 37 -> 32 on a 16 grid, 40 -> 48, a
             guide at 35 catches 37, a vertical guide leaves y alone,
             locked guides neither grow nor clear.
  -drawtest  counts the pixels on a real pixmap: grid 12509, one guide
             280 (= the canvas height), rulers 558 and none of them
             inside the canvas.

Measured: drawtest, viewtest, menutest, optest, selmodtest, retouchtest,
selecttest, movetest, croptest, typetest -> 20 green, 0 red (10 tests x
depth 24/depth 8); -selftest PASS on both, byte-identical output.
This commit is contained in:
lotherk committed 2026-11-22 13:09:53 +00:00
1 parent d6479ef90f
commit 208ec91ba9
3 files changed
+6132 -126

No files matched your search

+18 -4
View File
@@ -466,13 +466,27 @@ deshalb laufen sie jetzt ueber `OpPerPixel`, damit eine neue Operation die
Maske nicht vergessen kann.
Ein Menueeintrag wird ueber seinen vollen Pfad gebunden, nicht ueber das
Label: die Referenz hat "Horizontal" in Image > Flip und in Layer > Type.
Belegt ohne Display: `-menutest` (31 Pfade, jeder loest auf den Befehl auf,
den der Callback schaltet) und `-optest` gegen die Arithmetik, nicht gegen
Belegt ohne Display: `-menutest` (206 Pfade, jeder loest auf den Befehl auf,
den der Callback schaltet; kein Pfad doppelt belegt, ein unbekannter Pfad
bleibt CMD_NONE) und `-optest` gegen die Arithmetik, nicht gegen
"das Bild hat sich geaendert" -- eine harte Kante wird zu 170
weichgezeichnet, dieselbe Kante zu 255 bzw. 0 geschaerft, eine
Mosaic-Zelle zu ihrem Mittelwert. Alle acht Tests gruen auf Tiefe 24 und
Mosaic-Zelle zu ihrem Mittelwert. Alle Tests gruen auf Tiefe 24 und
Tiefe 8, `-selftest` byte-identisch (2.359.350 Bytes, 0 Abweichungen).
Offen: PNG/TIFF/PSD, Distort/Noise-Render, Effekte-Ebene, P3-P6.
Stand 2026-11-22 (View-Menue): Die Schalter des View-Menues werden nicht
nur gekippt, sondern gelesen. `SnapX`/`SnapY` ziehen einen Marquee- oder
Crop-Zug auf das Gitter oder eine Hilfslinie (eine Linie in Reichweite
gewinnt gegen das Gitter, eine gesperrte Hilfslinie nimmt keine neuen an
und laesst sich nicht loeschen), `DrawGuides` malt Gitter, Hilfslinien und
Lineale auf den Canvas -- nicht ins Bild. Zwei Belege: `-viewtest` prueft
die Snap-Arithmetik (37 -> 32 auf einem 16er Gitter, 40 -> 48, eine
Hilfslinie bei 35 faengt 37, eine vertikale Linie laesst y in Ruhe), und
`-drawtest` zaehlt die Pixel, die die Dekoration auf einem echten Pixmap
hinzufuegt (Gitter 12.509, eine Hilfslinie 280 = die Canvas-Hoehe, Lineal
558 und nichts davon im Canvas).
Offen: PNG/TIFF/PSD als *Ausgabe*, Distort/Noise-Render, Effekte-Ebene,
P3-P6.
Stand 2026-11-22 (Auswahl-Morphologie und Optionsleiste): Select > Modify
(Border, Smooth, Expand, Contract), Grow, Similar und Feather rechnen auf
+13 -2
View File
@@ -122,8 +122,19 @@ narratives and test notes, is `docs/reference/mcde-agents-history-2026-11-13.txt
has "Horizontal" in Image > Flip and in Layer > Type, and the label
alone cannot tell them apart. `CommandOf` takes "menu/sub/item", the
reader stores it in `Item.path`, and `-menutest` proves every path
resolves to the command the callback switches on (31 paths, measured
2026-11-22). `DTPHOTO_CMDS=1` prints what the loaded menu file bound.
resolves to the command the callback switches on, that no path is
claimed twice and that a path nobody knows stays CMD_NONE (206 paths,
0 doubled, measured 2026-11-22). The table ends at its NULL entry so
the test walks it without knowing the length. `DTPHOTO_CMDS=1` prints
what the loaded menu file bound: 206 of 206, none on CMD_NONE. Every
menu path in `dtphoto.menu` resolves, so a bound entry is a wired one.
The View switches are read, not just flipped: `SnapX`/`SnapY` pull a
marquee or crop drag onto the grid or a guide, `DrawGuides` paints the
grid, the guides and the rulers on the canvas (not into the picture),
and `-viewtest` checks the snapping arithmetic while `-drawtest`
counts the pixels the decorations add on a real pixmap. A flag that
only toggles itself is a menu entry that does nothing, which is why
both tests exist.
`dtphoto -optest|-menutest` are headless too: the operations are checked
against the arithmetic (a hard edge blurred to 170, the same edge
sharpened clamped to 255 and 0, a mosaic cell to its mean) and not
File diff suppressed because it is too large. Load diff