PTHighlights

@interface PTHighlights : NSObject

Save the current Highlight information in the class to a file.

  • Undocumented

    Declaration

    Objective-C

    - (void)Load: (NSString *)file_name;

    Swift

    func load(_ file_name: String!)
  • Undocumented

    Declaration

    Objective-C

    - (void)Save: (NSString *)file_name;

    Swift

    func save(_ file_name: String!)
  • Save the current Highlight information in the class to an XML string.

    Declaration

    Objective-C

    - (NSString *)SaveToString;

    Swift

    func saveToString() -> String!

    Return Value

    the highlight XML file contents as a string

  • Add highlights.

    Declaration

    Objective-C

    - (void)Add:(PTHighlights *)hlts;

    Swift

    func add(_ hlts: PTHighlights!)

    Parameters

    hlts

    the Highlights instance containing the highlights to be added.

  • Clear the current Highlight information in the class.

    Declaration

    Objective-C

    - (void)Clear;

    Swift

    func clear()
  • Rewind the internal pointer to the first highlight.

    Note

    the PDF document can be a dummy document unless GetCurrentQuads() is to be called.

    Declaration

    Objective-C

    - (void)Begin:(PTPDFDoc *)doc;

    Swift

    func begin(_ doc: PTPDFDoc!)

    Parameters

    doc

    the PDF document to which the highlights correspond.

  • Query if there is any subsequent highlight after the current highlight.

    Declaration

    Objective-C

    - (BOOL)HasNext;

    Swift

    func hasNext() -> Bool
  • Move the current highlight to the next highlight.

    Declaration

    Objective-C

    - (void)Next;

    Swift

    func next()
  • Get the page number of the current highlight.

    Declaration

    Objective-C

    - (int)GetCurrentPageNumber;

    Swift

    func getCurrentPageNumber() -> Int32
  • Get the corresponding quadrangles of the current highlight.

    Note

    the ‘quads’ array is owned by the current Highlights and does not need to be explicitly released. Since a highlight may correspond to multiple quadrangles, e.g., when it crosses a line, the number of resulting quadrangles may be larger than 1.

    Declaration

    Objective-C

    - (PTVectorQuadPoint *)GetCurrentQuads;

    Swift

    func getCurrentQuads() -> PTVectorQuadPoint!

    Parameters

    quads

    the output pointer to the resulting quadrangles.

    Return Value

    the number of the resulting quadrangles. Each quadrangle has eight doubles (x1, y1), (x2, y2), (x3, y3), (x4, y4) denoting the four vertices in counter-clockwise order.

  • Get a TextRange object that represents the current highlight.

    Declaration

    Objective-C

    - (PTPDFTextRange *)GetCurrentTextRange;

    Swift

    func getCurrentTextRange() -> PTPDFTextRange!
  • Undocumented

    Declaration

    Objective-C

    + (PTHighlights*)CreateInternal: (unsigned long long)impl;

    Swift

    class func createInternal(_ impl: UInt64) -> PTHighlights!
  • Undocumented

    Declaration

    Objective-C

    - (unsigned long long)GetHandleInternal;

    Swift

    func getHandleInternal() -> UInt64
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()