public abstract class

BaseRectsAnnotation

extends Annotation
java.lang.Object
   ↳ com.pspdfkit.annotations.Annotation
     ↳ com.pspdfkit.annotations.BaseRectsAnnotation
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Abstract base-class of all markup annotations: TextMarkupAnnotation and RedactionAnnotation.

Summary

[Expand]
Inherited Constants
From class com.pspdfkit.annotations.Annotation
[Expand]
Inherited Fields
From class com.pspdfkit.annotations.Annotation
Protected Constructors
BaseRectsAnnotation(int pageIndex)
Creates a markup annotation on a page with specified number.
Public Methods
List<RectF> getRects()

Returns list of all rectangles that represent this markup annotation in PDF coordinates.

boolean isResizable()
Check if the annotation is resizable, or if this is a non-resizable annotation.
void setRects(List<RectF> rects)
Sets rectangles for this annotation.
[Expand]
Inherited Methods
From class com.pspdfkit.annotations.Annotation
From class java.lang.Object

Protected Constructors

protected BaseRectsAnnotation (int pageIndex)

Creates a markup annotation on a page with specified number.

Parameters
pageIndex Page number of the page on which to create this annotation.

Public Methods

public List<RectF> getRects ()

Returns list of all rectangles that represent this markup annotation in PDF coordinates.


NOTE: Modifying this list directly or the rects in it without calling setRects(List) will not work. Always call setRects(List) after modifying the data to avoid inconsistent state.

Returns
  • A list of rects representing this annotation.

public boolean isResizable ()

Check if the annotation is resizable, or if this is a non-resizable annotation.

Returns
  • true if the annotation can be resized (e.g. ink annotation) or false if it is a non-resizable one (e.g. note annotation).

public void setRects (List<RectF> rects)

Sets rectangles for this annotation. These should be text rects obtained using getPageTextRects(int, int, int).

Parameters
rects Rects for annotation in PDF coordinates.