EpubPage

One reflowed EPUB page: paints backgrounds/borders, then text lines and images.

A page object is permanent (#221) and holds no layout of its own: what it paints comes from EpubDocument.render, which lays the chapter out again when the memory budget had dropped it (#218). What a viewer asks without painting (size, location) is answered from the constructor, so composing a page never lays anything out.

Properties

Link copied to clipboard

The spine item this page belongs to.

Link copied to clipboard
open override val displayHeight: Double
Link copied to clipboard
open override val displayWidth: Double
Link copied to clipboard
Link copied to clipboard

The tappable link regions on this page, in display space (same rect convention as KiteStructuredText: y-min in bottom, y-max in top, y measured downward). One rect per line a link touches; consecutive same-target runs on a line merge into one rect. Internal targets are zipPath#fragment strings resolvable via EpubDocument.pageIndexOfHref; external URLs are verbatim.

Link copied to clipboard

Where this page sits: its chapter, and its index inside that chapter.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun displayToDeviceBase(): KiteMatrix

EPUB is y-down from top-left, so the base is a straight vertical flip.

Link copied to clipboard

What this page says, in the order a reader that speaks would say it: one item per block of text or per image, each carrying the role its source element declared (<h2> is a heading, <li> a list item).

Link copied to clipboard
open override fun renderTo(canvas: KiteCanvas, deviceCtm: KiteMatrix)
Link copied to clipboard
open override fun textContent(): KiteStructuredText

Built once per live chapter and dropped with its pages, so search over a book stays bounded.