mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-01 22:19:10 -06:00
Notes and file attachments are saved with the NoRotate flag (/F bit 5), but nothing honoured it: on a page with /Rotate the icon was fitted to /Rect and turned with the page, and sat away from where it was placed. The vendored renderer now honours NoRotate (hayro-interpret patch 37): the appearance fitted to /Rect is turned against the page's rotation about the rectangle's upper-left corner, which stays put (ISO 32000-2 12.5.3). Form fields and links stay in /Rect, where their click targets come from. A counterrotated appearance, as stamps use, would be turned twice by viewers that honour the flag. Annotation::shown_rect gives the box the note is drawn in. The UI uses it for hit-testing, outlines, moving, the hover pop-up, the Comments panel flash and the edit composer; a resize maps it back to /Rect. comment_add anchors an icon's displayed top-left at `at`, and comment_list, doc_info and comment_edit use the drawn box. This also covers the sticky-note part of #1869.