mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
* Canvas: tool gestures start at the press origin, not where egui recognised the drag (#123) A drag is only recognised once the pointer has moved past egui's click distance; the Down event used the pointer position at that moment, so a Type tool drag-selection's anchor landed a glyph or more away from where the button went down. Adds a text-engine test that the caret geometry (clusters, lines) sits on the rendered glyphs for tracking, horizontal scale, mixed sizes and wrapped, centred paragraph text. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Type tool: PSD type edits on the layout it shows; size edits are live, one step per drag, sized as shown (#123, #124) - Clicking into a PSD type layer whose pixels are still Photoshop's re-renders it with our engine first (inside the edit session's history step; Cancel restores Photoshop's pixels), so caret and selection sit on what is shown. Hit-testing a type layer also accepts its shown pixels. - type.edit / type.setStyle damage only the layer's old and new pixels, so the canvas recomposites that area instead of the whole document. - Scrubbing a size (or any) type field coalesces per drag: live preview every frame, one history step per drag. - Options bar and Properties show and edit font size and leading as the layer appears (size x transform scale, like Photoshop), and the options bar shows the size at the selection. - examples/type_bench: 6000x4000, 50 type layers, size step went from 297 ms to 4.6 ms (CPU canvas), 489 ms to 10 ms with drop shadows. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Crop test: the frame starts at the press origin now (#123) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>