Class BoundingBox
java.lang.Object
org.verapdf.wcag.algorithms.entities.geometry.BoundingBox
- Direct Known Subclasses:
MultiBoundingBox
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBoundingBox(double[] bbox) BoundingBox(double left, double bottom, double right, double top) BoundingBox(Integer pageNumber) BoundingBox(Integer pageNumber, double[] bbox) BoundingBox(Integer pageNumber, double left, double bottom, double right, double top) BoundingBox(Integer pageNumber, Integer lastPageNumber, double[] bbox) BoundingBox(Integer pageNumber, Integer lastPageNumber, double left, double bottom, double right, double top) -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareHorizontalOverlapping(BoundingBox first, BoundingBox second) static booleanareOverlapsBoundingBoxesExcludingPages(BoundingBox boundingBox1, BoundingBox boundingBox2) static booleanareSameBoundingBoxes(BoundingBox boundingBox1, BoundingBox boundingBox2) static booleanareSameBoundingBoxesExcludingPages(BoundingBox boundingBox1, BoundingBox boundingBox2) static booleanareVerticalOverlapping(BoundingBox first, BoundingBox second) booleancontains(BoundingBox other) booleancontains(BoundingBox other, double horizontalOffset, double verticalOffset) cross(BoundingBox other) cross(BoundingBox other, double horizontalOffset, double verticalOffset) static BoundingBoxcross(BoundingBox first, BoundingBox second) static BoundingBoxcross(BoundingBox first, BoundingBox second, double horizontalOffset, double verticalOffset) booleandoublegetArea()doublegetBoundingBox(int pageNumber) doubledoubledoubledoublegetIntersectionPercent(BoundingBox boundingBox) doublegetLeftX()getLeftX(int pageNumber) doublegetRightX(int pageNumber) doublegetTopY()doublegetVerticalGap(BoundingBox boundingBox) doublegetVerticalIntersectionPercent(BoundingBox boundingBox) doublegetWidth()inthashCode()voidinit(double left, double bottom, double right, double top) voidinit(BoundingBox rect) booleanisEmpty()booleanbooleanmove(double xShift, double yShift) booleannotOverlaps(BoundingBox other) booleannotOverlaps(BoundingBox other, double eps) booleanoverlaps(BoundingBox other) booleanoverlaps(BoundingBox other, double eps) scale(double coeffX, double coeffY) voidsetBottomY(double bottomY) voidsetLastPageNumber(Integer lastPageNumber) voidsetLeftX(double leftX) voidsetPageNumber(Integer pageNumber) voidsetRightX(double rightX) voidsetSizes(double width, double height) voidsetTopY(double topY) toString()union(BoundingBox second) static BoundingBoxunion(BoundingBox first, BoundingBox second) booleanweaklyContains(BoundingBox fullRectangle)
-
Field Details
-
pageNumber
-
lastPageNumber
-
leftX
protected double leftX -
bottomY
protected double bottomY -
rightX
protected double rightX -
topY
protected double topY
-
-
Constructor Details
-
BoundingBox
public BoundingBox() -
BoundingBox
-
BoundingBox
public BoundingBox(double[] bbox) -
BoundingBox
-
BoundingBox
-
BoundingBox
public BoundingBox(double left, double bottom, double right, double top) -
BoundingBox
-
BoundingBox
-
BoundingBox
-
-
Method Details
-
setPageNumber
-
setLastPageNumber
-
getPageNumber
-
getLastPageNumber
-
union
-
union
-
normalize
-
getWidth
public double getWidth() -
getHeight
public double getHeight() -
hashCode
public int hashCode() -
equals
-
areSameBoundingBoxes
-
areSameBoundingBoxesExcludingPages
public static boolean areSameBoundingBoxesExcludingPages(BoundingBox boundingBox1, BoundingBox boundingBox2) -
areOverlapsBoundingBoxesExcludingPages
public static boolean areOverlapsBoundingBoxesExcludingPages(BoundingBox boundingBox1, BoundingBox boundingBox2) -
overlaps
-
overlaps
-
notOverlaps
-
notOverlaps
-
contains
-
contains
-
weaklyContains
-
areHorizontalOverlapping
-
areVerticalOverlapping
-
cross
-
cross
-
cross
public static BoundingBox cross(BoundingBox first, BoundingBox second, double horizontalOffset, double verticalOffset) -
cross
-
getArea
public double getArea() -
getBottomY
public double getBottomY() -
getTopY
public double getTopY() -
getLeftX
public double getLeftX() -
getRightX
public double getRightX() -
setBottomY
public void setBottomY(double bottomY) -
setTopY
public void setTopY(double topY) -
setLeftX
public void setLeftX(double leftX) -
setRightX
public void setRightX(double rightX) -
getCenterX
public double getCenterX() -
getCenterY
public double getCenterY() -
getRightX
-
getLeftX
-
isEmpty
public boolean isEmpty() -
scale
-
move
-
setSizes
public void setSizes(double width, double height) -
init
-
getBoundingBox
-
isOnePageBoundingBox
public boolean isOnePageBoundingBox() -
isSeveralPagesBoundingBox
public boolean isSeveralPagesBoundingBox() -
init
public void init(double left, double bottom, double right, double top) -
getIntersectionPercent
-
getVerticalIntersectionPercent
-
getVerticalGap
-
getLocation
-
toString
-