PdfViewportState


class PdfViewportState


Represents the state of the viewport on which androidx.pdf.view.PdfView is overlaid.

Summary

Public constructors

PdfViewportState(
    firstVisiblePage: Int,
    visiblePagesCount: Int,
    pageBounds: SparseArray<RectF>,
    zoom: Float
)

Public properties

Int

The index of the first visible page 0-based.

SparseArray<RectF>

A mapping of page numbers to their bounds in view coordinates.

Int

The number of currently visible pages.

Float

The current zoom level of the PDF.

Public constructors

PdfViewportState

Added in 1.0.0-alpha19
PdfViewportState(
    firstVisiblePage: Int,
    visiblePagesCount: Int,
    pageBounds: SparseArray<RectF>,
    zoom: Float
)
Parameters
firstVisiblePage: Int

The index of the first visible page 0-based.

visiblePagesCount: Int

The number of currently visible pages.

pageBounds: SparseArray<RectF>

A mapping of page numbers to their bounds in view coordinates.

zoom: Float

The current zoom level of the PDF.

Public properties

firstVisiblePage

Added in 1.0.0-alpha19
val firstVisiblePageInt

The index of the first visible page 0-based.

pageBounds

Added in 1.0.0-alpha19
val pageBoundsSparseArray<RectF>

A mapping of page numbers to their bounds in view coordinates.

visiblePagesCount

Added in 1.0.0-alpha19
val visiblePagesCountInt

The number of currently visible pages.

zoom

Added in 1.0.0-alpha19
val zoomFloat

The current zoom level of the PDF.