java.lang.Object | |
↳ | com.pspdfkit.utils.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(Matrix)
must be called to apply change to the drawable rect.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PageRect(float left, float top, float right, float bottom)
Creates a page rectangle representation.
| |||||||||||
PageRect(RectF rect)
Creates a page rectangle representation.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | compareTo(PageRect another) | ||||||||||
boolean | equals(Object o) | ||||||||||
RectF |
getPageRect()
Returns the rect representing the position of the object on screen.
| ||||||||||
RectF |
getScreenRect()
Returns the rect representing the current draw position of the object on the screen
transformed with current page scroll, zoom or other transformations.
| ||||||||||
int | hashCode() | ||||||||||
void |
inset(float dx, float dy)
Inset the page rectangle by (dx,dy).
| ||||||||||
void |
set(PageRect pageRect)
Sets another page rect.
| ||||||||||
void |
set(RectF rect)
Sets new page rect.
| ||||||||||
void |
set(float left, float top, float right, float bottom)
Sets new page rect.
| ||||||||||
String | toString() | ||||||||||
void |
updatePageRect(Matrix pageToScreenMatrix)
Updates page rect from screen rect.
| ||||||||||
void |
updateScreenRect(Matrix pageToScreenMatrix)
Updates screen rect to reflect position according to passed in matrices.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Creates a page rectangle representation.
left | Left border coordinate in PDF points. |
---|---|
top | Top border coordinate in PDF points. |
right | Right border coordinate in PDF points. |
bottom | Bottom border coordinate in PDF points. |
Creates a page rectangle representation.
rect | Rectangle to be set as new page rect. |
---|
Returns the rect representing the position of the object on screen. This is in PDF coordinates - (0,0) starts on bottom left of the page and bottom < top. This is the rect you use if you want to find out PDF-stored position of the object on the page.
Returns the rect representing the current draw position of the object on the screen transformed with current page scroll, zoom or other transformations. This is the rect to use if you want to find out where on the page the object is drawn right now.
Inset the page rectangle by (dx,dy). If dx is positive, then the sides are moved inwards, making the rectangle narrower. If dx is negative, then the sides are moved outwards, making the rectangle wider. The same holds true for dy and the top and bottom.
dx | Horizontal inset in PDF points. |
---|---|
dy | Vertical inset in PDF points. |
Sets another page rect. Call updateScreenRect(Matrix)
to update screen rect.
pageRect | Page rect to be set as a page rect. |
---|
Sets new page rect. Call updateScreenRect(Matrix)
to update screen rect.
rect | Rect to be set as a page rect. |
---|
Sets new page rect. Call updateScreenRect(Matrix)
to update screen rect.
left | Left border coordinate in PDF points. |
---|---|
top | Top border coordinate in PDF points. |
right | Right border coordinate in PDF points. |
bottom | Bottom border coordinate in PDF points. |
Updates page rect from screen rect.
pageToScreenMatrix | Page-to-screen transformation matrix. |
---|
Updates screen rect to reflect position according to passed in matrices.
pageToScreenMatrix | Page-to-screen transformation matrix. |
---|