Package com.pdftools.geometry.units
Class Rectangle
java.lang.Object
com.pdftools.geometry.units.Rectangle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether another rectangle is non-strictly inscribed into the present rectangle.booleanstatic RectangleGets the bottom coordinate of the rectangle asLengthobject.getLeft()Gets the left coordinate of the rectangle asLengthobject.Get the position (origin) of the rectangle asPointobject.getRight()Gets the right coordinate of the rectangle asLengthobject.getSize()Get the size of the rectangle asSizeobject.getTop()Gets the top coordinate of the rectangle asLengthobject.inthashCode()static RectangleCreate aRectangleobject from a string representation.toString()Creates a string representation as x-y-width-height-tuple with associated suitable metric units, "m", "cm" or "mm".toString(Length.Units unit) Creates a string representation as x-y-width-height-tuple with the specified unit.
-
Constructor Details
-
Method Details
-
fromEdges
-
parse
Create aRectangleobject from a string representation.- Parameters:
value- Allowed are value-unit pairs of the form "<x_value><x_unit> <y_value><y_unit> <right_value><right_unit> <height_value><height_unit>". Example: "12.3cm 23.4mm 34.5mm 45.6mm"- Returns:
-
toString
Creates a string representation as x-y-width-height-tuple with associated suitable metric units, "m", "cm" or "mm". -
toString
Creates a string representation as x-y-width-height-tuple with the specified unit. -
contains
Determines whether another rectangle is non-strictly inscribed into the present rectangle.- Parameters:
other- asRectangleobject- Returns:
-
getPosition
Get the position (origin) of the rectangle asPointobject. -
getSize
Get the size of the rectangle asSizeobject. -
getLeft
Gets the left coordinate of the rectangle asLengthobject. -
getTop
Gets the top coordinate of the rectangle asLengthobject. -
getRight
Gets the right coordinate of the rectangle asLengthobject. -
getBottom
Gets the bottom coordinate of the rectangle asLengthobject. -
equals
-
hashCode
public int hashCode()
-