PdfPageGotoLinkContent.Destination


public static final class PdfPageGotoLinkContent.Destination
extends Object implements Parcelable

java.lang.Object
   ↳ android.graphics.pdf.content.PdfPageGotoLinkContent.Destination


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

Summary

Inherited constants

Fields

public static final Creator<PdfPageGotoLinkContent.Destination> CREATOR

Public constructors

Destination(int pageNumber, float xCoordinate, float yCoordinate, float zoom)

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

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

int getPageNumber()

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

float getXCoordinate()

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

float getYCoordinate()

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

float getZoom()

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.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Fields

CREATOR

Added in API level 35
Also in S Extensions 13
public static final Creator<PdfPageGotoLinkContent.Destination> CREATOR

Public constructors

Destination

Added in API level 35
Also in S Extensions 13
public Destination (int pageNumber, 
                float xCoordinate, 
                float yCoordinate, 
                float zoom)

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

Throws
IllegalArgumentException If pageNumber or either of the coordinates or zoom are less than zero

Public methods

describeContents

Added in API level 35
public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

getPageNumber

Added in API level 35
Also in S Extensions 13
public int getPageNumber ()

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

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

getXCoordinate

Added in API level 35
Also in S Extensions 13
public float getXCoordinate ()

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

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

getYCoordinate

Added in API level 35
Also in S Extensions 13
public float getYCoordinate ()

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

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

getZoom

Added in API level 35
Also in S Extensions 13
public float getZoom ()

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.

Returns
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
public void writeToParcel (Parcel dest, 
                int flags)

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.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES