PageRect

This is a rect representing a page object drawn on screen. It's specialty that is has two rects - one to represent this in Page coordinates and one to represent it in screen coordinates transformed with current draw matrix.

Note that all operations modify the page rect and updateScreenRect must be called to apply change to the drawable rect.

Constructors

Link copied to clipboard
constructor(left: Float, top: Float, right: Float, bottom: Float)
Creates a page rectangle representation.
constructor(@NonNull rect: RectF)
Creates a page rectangle representation.

Properties

Link copied to clipboard
The rectangle representing the object position in PDF page coordinates.
Link copied to clipboard
The rectangle representing the object position in screen coordinates.

Functions

Link copied to clipboard
open fun compareTo(@NonNull another: PageRect): Int
Compares this page rect to another based on screen coordinates.
Link copied to clipboard
open fun equals(@Nullable o: Any): Boolean
Compares this page rect to another object for equality.
Link copied to clipboard
open fun hashCode(): Int
Returns a hash code value for this page rect based on the page coordinates.
Link copied to clipboard
open fun inset(dx: Float, dy: Float)
Inset the page rectangle by (dx,dy).
Link copied to clipboard
open fun set(@NonNull rect: RectF)
open fun set(left: Float, top: Float, right: Float, bottom: Float)
Sets new page rect.
open fun set(@NonNull pageRect: PageRect)
Sets another page rect.
Link copied to clipboard
open fun toString(): String
Returns a string representation of this page rect including both page and screen coordinates.
Link copied to clipboard
open fun updatePageRect(@NonNull pageToScreenMatrix: Matrix)
Updates page rect from screen rect.
Link copied to clipboard
open fun updateScreenRect(@NonNull pageToScreenMatrix: Matrix)
Updates screen rect to reflect position according to passed in matrices.