SvgDocument

A standalone .svg file read as a one-page document, so a viewer can open it the same way it opens a PDF or a comic.

The page is the SVG's own viewport, 1 px = 1 pt; a viewer scales to fit. Everything is drawn as vectors, so zooming stays sharp. The page gives each <a> with an href as a link in KitePage.hyperlinks, and the text it draws in KitePage.textContent.

val doc = SvgDocument.open(bytes)
doc.pages.single().renderTo(canvas, ctm)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val chapterCount: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val pageCount: Int
Link copied to clipboard
open override val pages: List<KitePage>

Functions

Link copied to clipboard
open fun bookmarkOf(location: KiteLocation): KiteBookmark
Link copied to clipboard
open fun isChapterReady(chapter: Int): Boolean
Link copied to clipboard
open fun keepChapters(chapters: Set<Int>)
Link copied to clipboard
open fun locate(bookmark: KiteBookmark): KiteLocation
Link copied to clipboard
open fun locationOf(pageIndex: Int): KiteLocation?
Link copied to clipboard
open fun page(location: KiteLocation): KitePage
Link copied to clipboard
open fun pageCountIn(chapter: Int): Int
Link copied to clipboard
open fun pageIndexOf(location: KiteLocation): Int?
Link copied to clipboard
open fun prepareChapter(chapter: Int)
open suspend fun prepareChapter(chapter: Int, checkpoint: suspend () -> Unit)
Link copied to clipboard
open fun topOf(bookmark: KiteBookmark): Double?