KiteTextSelection
data class KiteTextSelection(val pageIndex: Int, val start: Int, val end: Int, val text: String, val quads: List<KiteRectangle>, val location: KiteLocation? = null)(source)
A finalized or in-progress text selection on one page (cross-page selection is out of scope). start/end are INCLUSIVE flattened char indices into the page's io.github.yuroyami.kitepdf.core.KiteStructuredText reading order; text is the range as a reader copies it (io.github.yuroyami.kitepdf.core.KiteStructuredText.copyText): \n\n between blocks, and a wrapped paragraph of a book as one line; quads are display-space, one per line touched.
Constructors
Link copied to clipboard
constructor(pageIndex: Int, start: Int, end: Int, text: String, quads: List<KiteRectangle>, location: KiteLocation? = null)
Legacy constructor for callers that do not yet carry a location.
Properties
Functions
Link copied to clipboard
fun copy(pageIndex: Int = this.pageIndex, start: Int = this.start, end: Int = this.end, text: String = this.text, quads: List<KiteRectangle> = this.quads): KiteTextSelection
Keeps the original copy signature and preserves this selection's location.