Destination


class Destination : Parcelable
kotlin.Any
   ↳ android.graphics.pdf.content.PdfPageGotoLinkContent.Destination

Represents the content associated with the destination where a goto link is directing

Summary

Inherited constants
Public constructors
Destination(pageNumber: Int, xCoordinate: Float, yCoordinate: Float, zoom: Float)

Creates a new instance of Destination using the page number, x coordinate, and y coordinate of the destination where goto link is directing, and the zoom factor of the page when goto link takes to the destination

Public methods
Int

Int

Gets the page number of the destination where the PdfPageGotoLinkContent is directing.

Float

Gets the x coordinate in points (1/72") of the destination where the PdfPageGotoLinkContent is directing.

Float

Gets the y coordinate in points (1/72") of the destination where the PdfPageGotoLinkContent is directing.

Float

Gets the zoom factor of the page when the goto link takes to the destination

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<PdfPageGotoLinkContent.Destination!>

Public constructors

Destination

Destination(
    pageNumber: Int,
    xCoordinate: Float,
    yCoordinate: Float,
    zoom: Float)

Creates a new instance of Destination using the page number, x coordinate, and y coordinate of the destination where goto link is directing, and the zoom factor of the page when goto link takes to the destination

Note: Here (0,0) represents top-left corner of the page

Parameters
pageNumber Int: Page number of the goto link Destination
xCoordinate Float: X coordinate of the goto link Destination in points (1/72")
yCoordinate Float: Y coordinate of the goto link Destination in points (1/72")
zoom Float: Zoom factor Destination#getZoom() of the page when goto link takes to the destination
Exceptions
java.lang.IllegalArgumentException If pageNumber or either of the coordinates or zoom are less than zero

Public methods

describeContents

Added in API level 35
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getPageNumber

fun getPageNumber(): Int

Gets the page number of the destination where the PdfPageGotoLinkContent is directing.

Return
Int page number of the destination where goto link is directing the user. Value is 0 or greater

getXCoordinate

fun getXCoordinate(): Float

Gets the x coordinate in points (1/72") of the destination where the PdfPageGotoLinkContent is directing.

Note: If underlying pdfium library can't determine the x coordinate, it will be set to 0

Return
Float x coordinate of the Destination where the goto link is directing the user. Value is 0.0f or greater

getYCoordinate

fun getYCoordinate(): Float

Gets the y coordinate in points (1/72") of the destination where the PdfPageGotoLinkContent is directing.

Note: If underlying pdfium library can't determine the y coordinate, it will be set to 0

Return
Float y coordinate of the Destination where the goto link is directing the user. Value is 0.0f or greater

getZoom

fun getZoom(): Float

Gets the zoom factor of the page when the goto link takes to the destination

Note: If there is no zoom value embedded, default value of Zoom will be zero. Otherwise, it will be less than 1.0f in case of zoom out and greater than 1.0f in case of zoom in.

Return
Float zoom factor of the page when the goto link takes to the destination Value is 0.0f or greater

writeToParcel

Added in API level 35
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties