[Image references 2/6] Shared image geometry and executable vectors #1825

Closed
opened 2026-08-28 09:43:10 +00:00 by brenno · 0 comments
Owner

Parent: #1801
Depends on: #1824
Completed prerequisite: #1813
Contract: docs/design/IMAGE_CALLOUTS.md, frozen revision 4 (§4 and §9)

Outcome

Provide one Flutter-free geometry contract that every image-reference renderer and the editor can use or verify against. This turns the measurements recorded in the design into permanent, executable repository evidence.

Scope

  • Implement ImageViewportGeometry for intrinsic image size, slot size, focal point and image zoom.
  • Map point and region targets from normalised image space to the painted image rectangle.
  • Report clipping against the visible slot without inventing or clamping callout geometry.
  • Match the complete cover and zoom transform from §4.1, including the different focal behaviour in both branches and the shared 0..400 zoom clamp.
  • Create one checked-in vector table used by the pure Dart implementation, real Flutter layout and generated browser CSS.
  • Keep the geometry service free of Flutter UI dependencies so hit-testing, rendering and export cannot drift into separate formulae.

Acceptance evidence

  • Landscape, portrait and square images.
  • Slots at 20%, 40% and 70% of a 16:9 slide.
  • Zoom inputs 0, 100, 140, 400, a negative value and a value above the maximum.
  • Focal points at 0, 0.5 and 1 on both axes.
  • Point targets on all corners and edge midpoints, plus regions with width and height and cases clipped by the slot.
  • A real browser measurement of the generated CSS and a real Flutter render are compared to the same vectors with an explicit pixel tolerance.
  • The two previously disproved CSS formulations fail a focused regression test or fixture mutation.
  • The measurement command is part of the repository-native validation workflow; the 486-case claim must be rerunnable rather than copied from the design document.

Boundaries

  • No public authoring control and no visible callout feature in this slice.
  • Do not add a second geometry implementation per renderer.
  • Do not reproduce the pre-#1813 zoom bug for compatibility; #1813 is fixed on main and the frozen contract is authoritative.

Use small coherent commits for the pure geometry, fixtures, browser proof, Flutter proof and documentation/quality-gate wiring.

Parent: #1801 Depends on: #1824 Completed prerequisite: #1813 Contract: `docs/design/IMAGE_CALLOUTS.md`, frozen revision 4 (§4 and §9) ## Outcome Provide one Flutter-free geometry contract that every image-reference renderer and the editor can use or verify against. This turns the measurements recorded in the design into permanent, executable repository evidence. ## Scope - Implement `ImageViewportGeometry` for intrinsic image size, slot size, focal point and image zoom. - Map point and region targets from normalised image space to the painted image rectangle. - Report clipping against the visible slot without inventing or clamping callout geometry. - Match the complete cover and zoom transform from §4.1, including the different focal behaviour in both branches and the shared `0..400` zoom clamp. - Create one checked-in vector table used by the pure Dart implementation, real Flutter layout and generated browser CSS. - Keep the geometry service free of Flutter UI dependencies so hit-testing, rendering and export cannot drift into separate formulae. ## Acceptance evidence - Landscape, portrait and square images. - Slots at 20%, 40% and 70% of a 16:9 slide. - Zoom inputs `0`, `100`, `140`, `400`, a negative value and a value above the maximum. - Focal points at `0`, `0.5` and `1` on both axes. - Point targets on all corners and edge midpoints, plus regions with width and height and cases clipped by the slot. - A real browser measurement of the generated CSS and a real Flutter render are compared to the same vectors with an explicit pixel tolerance. - The two previously disproved CSS formulations fail a focused regression test or fixture mutation. - The measurement command is part of the repository-native validation workflow; the 486-case claim must be rerunnable rather than copied from the design document. ## Boundaries - No public authoring control and no visible callout feature in this slice. - Do not add a second geometry implementation per renderer. - Do not reproduce the pre-#1813 zoom bug for compatibility; #1813 is fixed on `main` and the frozen contract is authoritative. Use small coherent commits for the pure geometry, fixtures, browser proof, Flutter proof and documentation/quality-gate wiring.
brenno 2026-08-28 12:55:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
LibreKAT/Ocideck#1825
No description provided.