KitePageHit

data class KitePageHit(val pageIndex: Int, val x: Double, val y: Double, val location: KiteLocation? = null)(source)

The page under a viewport point, and a point on that page.

From KiteDocViewState.hitTest, the point is in the page's own space. For a PDF that is the page's user space, y-up, with rotation unfolded, in the file's own coordinates: a page whose crop box does not start at 0 gives points offset by that start. For an EPUB page it is display points, y-up from the page's bottom-left. Other formats use their own page space.

From KiteDocViewState.hitTestDisplay, the point is in display space for every format: points from the top-left corner of the page as it is shown, y down. That is the space of search hits and highlights (#432).

Constructors

Link copied to clipboard
constructor(pageIndex: Int, x: Double, y: Double, location: KiteLocation? = null)
constructor(pageIndex: Int, x: Double, y: Double)

Legacy constructor for callers that do not yet carry a location.

Properties

Link copied to clipboard

Exact page in the current layout; always present on viewer-produced results.

Link copied to clipboard

The viewer slot when this result was produced. Use location after publication.

Link copied to clipboard
val x: Double
Link copied to clipboard
val y: Double

Functions

Link copied to clipboard
fun copy(pageIndex: Int = this.pageIndex, x: Double = this.x, y: Double = this.y): KitePageHit

Keeps the original copy signature and preserves this result's location.