KitePageOverlayScope
What the pageOverlay of KiteDocView draws in: one page, in the page's own frame. The frame moves and scales with the page, so an element placed on a rectangle of the page stays on that rectangle at any zoom, and grows with the page (#30).
An element with neither displayRect nor pageRect sits at the top-left corner of the page, measured to fit inside the page.
Properties
The index of the page, as KiteDocViewState.currentPage and KitePageHit.pageIndex count it.
Functions
Sizes the element to rect and places it there. rect is in the display space of the page: the space of KiteDocViewState.hitTestDisplay, of search hits, and of the links and media elements of an EPUB page.
Follows a link that an element of the overlay opens, such as a link in a web view over an embedded document (#41), as a tap on a link of the page does: the onLinkTap of KiteDocView sees it first, and when that does not take it, a link inside the document moves the view to its target. href is a link as the page gives its own: on an EPUB page, a zip path with a fragment, as EpubLink.href is, or an address with a scheme. rect is the area of the link in display space. Call it on the main thread.
Sizes the element to rect and places it there. rect is in the page's own space: the space of KiteDocViewState.hitTest and of the rectangle of a PDF annotation.