Package com.pspdfkit.annotations
Class TextMarkupAnnotation
-
- All Implemented Interfaces:
public abstract class TextMarkupAnnotation extends BaseRectsAnnotation
Abstract base-class of all text markup annotations: HighlightAnnotation, , UnderlineAnnotation and StrikeOutAnnotation.
-
-
Method Summary
Modifier and Type Method Description void
updateTransformationProperties(@NonNull() RectF newBoundingBox, @NonNull() RectF oldBoundingBox)
Annotations may override this method to transform their properties (i.e. String
getHighlightedText()
Returns text highlighted by this annotation. List<TextBlock>
getHighlightedTextBlocks()
Returns list of highlighted text blocks for this annotation. -
-
Method Detail
-
updateTransformationProperties
void updateTransformationProperties(@NonNull() RectF newBoundingBox, @NonNull() RectF oldBoundingBox)
Annotations may override this method to transform their properties (i.e. points, rects, sizes) whenever the bounding box of the annotation changed.
- Parameters:
newBoundingBox
- New bounding box of the annotation (in PDF points).oldBoundingBox
- Old bounding box of the annotation (in PDF points).
-
getHighlightedText
@NonNull() String getHighlightedText()
Returns text highlighted by this annotation.
- Returns:
Highlighted text or an empty string if no text is highlighted.
-
getHighlightedTextBlocks
@NonNull() List<TextBlock> getHighlightedTextBlocks()
Returns list of highlighted text blocks for this annotation.
- Returns:
List of highlighted text blocks or an empty list if no text is highlighted.
-
-
-
-