PageProvider

interface PageProvider

Provider to feed 'book' with bitmaps which are used for rendering pages.

Properties

Link copied to clipboard
abstract val pageCount: Int

Returns number of available pages.

Functions

Link copied to clipboard
abstract fun updatePage(page: CurlPage, width: Int, height: Int, index: Int, backIndex: Int?)

Called once new bitmaps/textures are needed. Width and height are in pixels telling the size it will be drawn on screen and following them ensures that aspect ratio remains. But it's possible to return bitmap of any size though. You should use provided CurlPage for storing page information for requested page number. Index is a number between 0 and pageCount If provided, back index is the index to be used on the back side of page.