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.

    • 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.

      • 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.