Package com.pspdfkit.document.processor
Class ComparisonDocument
-
- All Implemented Interfaces:
-
android.os.Parcelable
public class ComparisonDocument implements Parcelable
This class holds the data used for document comparison. Use this class to provide documents when comparing them with the show method.
-
-
Field Summary
Fields Modifier and Type Field Description public final int
pageIndex
public final int
lineColor
public final static Parcelable.Creator<ComparisonDocument>
CREATOR
-
Constructor Summary
Constructors Constructor Description ComparisonDocument(DocumentSource documentSource, int pageIndex, int lineColor)
Creates and initializes a ComparisonDocument class. ComparisonDocument(ParcelableDocumentSource documentSource, int pageIndex, int lineColor)
Creates and initializes a ComparisonDocument class.
-
Method Summary
Modifier and Type Method Description int
getPageIndex()
Returns the index of the page to use for comparison within the document. int
getLineColor()
Returns the color used for tinting strokes of the document when performing comparison. int
describeContents()
void
writeToParcel(Parcel dest, int flags)
DocumentSource
getDocumentSource()
Returns the DocumentSource used by this comparison document. -
-
Constructor Detail
-
ComparisonDocument
ComparisonDocument(DocumentSource documentSource, int pageIndex, int lineColor)
Creates and initializes a ComparisonDocument class.- Parameters:
documentSource
- The DocumentSource to use for comparison.pageIndex
- The 0-based index of the page to use for comparison.lineColor
- The color to use for tinting the page content while comparing.
-
ComparisonDocument
ComparisonDocument(ParcelableDocumentSource documentSource, int pageIndex, int lineColor)
Creates and initializes a ComparisonDocument class.- Parameters:
documentSource
- The DocumentSource to use for comparison.pageIndex
- The 0-based index of the page to use for comparison.lineColor
- The color to use for tinting the page content while comparing.
-
-
Method Detail
-
getPageIndex
@IntRange(from = 0) int getPageIndex()
Returns the index of the page to use for comparison within the document.
- Returns:
The 0-based page index in the comparison document to be compared.
-
getLineColor
@ColorInt() int getLineColor()
Returns the color used for tinting strokes of the document when performing comparison.
- Returns:
Stroke color for the compared content.
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
getDocumentSource
@NonNull() DocumentSource getDocumentSource()
Returns the DocumentSource used by this comparison document. This source will be used to laod the document when performing point selection for document alignment, and when creating the final comparison document.
- Returns:
DocumentSource of this comparison document.
-
-
-
-