Why does the arrow on your inspection photo point at the wrong thing on another screen?
Because it was saved in pixels.
photo_markup stores every mark as a fraction of the image. The same markup renders correctly in a 48-pixel thumbnail, a full-screen tablet editor and a 4,000-pixel export.
Decisions
- Vector data is the source of truth. The flattened image is a derived artifact.
- One painter for the editor, the viewer and the export, so all three produce identical geometry.
- Forward-compatible both ways. An older app can open and re-save a newer document without destroying what it doesn't understand.
-
No
fitoption on the viewer, on purpose. Letterboxing would misalign the markup. Wrap it in aFittedBoxinstead. - A "not supported yet" list in the README.
Under the hood
- Box, ellipse, arrow, freehand and text tools. Pinch-zoom, pan, and one-finger drawing while zoomed. Undo and redo.
- Exports draw at output resolution, never upscale, and cap size by default, because a 12-megapixel image in memory is about 48 MB.
- JPEG encoding runs off the main thread. No platform channels.
- 37 tests.