compareTo

open fun compareTo(@NonNull another: PageRect): Int

Compares this page rect to another based on screen coordinates. Comparison is performed first by top position, then by left position. This ordering is useful for sorting page elements in reading order.

Return

A negative integer, zero, or a positive integer as this rect's screen position comes before, at the same position, or after the other.

Parameters

another

The page rect to compare with.