Class BoundingBox
- java.lang.Object
-
- org.verapdf.wcag.algorithms.entities.geometry.BoundingBox
-
- Direct Known Subclasses:
MultiBoundingBox
public class BoundingBox extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected doublebottomYprotected IntegerlastPageNumberprotected doubleleftXprotected IntegerpageNumberprotected doublerightXprotected doubletopY
-
Constructor Summary
Constructors Constructor Description BoundingBox()BoundingBox(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)BoundingBox(BoundingBox o)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(BoundingBox other)booleancontains(BoundingBox other, double horizontalOffset, double verticalOffset)BoundingBoxcross(BoundingBox other)BoundingBoxcross(BoundingBox other, double horizontalOffset, double verticalOffset)static BoundingBoxcross(BoundingBox first, BoundingBox second)static BoundingBoxcross(BoundingBox first, BoundingBox second, double horizontalOffset, double verticalOffset)booleanequals(Object o)doublegetArea()doublegetBottomY()BoundingBoxgetBoundingBox(int pageNumber)doublegetCenterX()doublegetCenterY()doublegetHeight()IntegergetLastPageNumber()doublegetLeftX()DoublegetLeftX(int pageNumber)StringgetLocation()IntegergetPageNumber()doublegetRightX()DoublegetRightX(int pageNumber)doublegetTopY()doublegetWidth()inthashCode()voidinit(double left, double bottom, double right, double top)voidinit(BoundingBox rect)booleanisEmpty()BoundingBoxmove(double xShift, double yShift)BoundingBoxnormalize()booleannotOverlaps(BoundingBox other)booleannotOverlaps(BoundingBox other, double eps)booleanoverlaps(BoundingBox other)booleanoverlaps(BoundingBox other, double eps)BoundingBoxscale(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)StringtoString()BoundingBoxunion(BoundingBox second)static BoundingBoxunion(BoundingBox first, BoundingBox second)booleanweaklyContains(BoundingBox fullRectangle)
-
-
-
Constructor Detail
-
BoundingBox
public BoundingBox()
-
BoundingBox
public BoundingBox(Integer pageNumber)
-
BoundingBox
public BoundingBox(double[] bbox)
-
BoundingBox
public BoundingBox(Integer pageNumber, double[] bbox)
-
BoundingBox
public BoundingBox(double left, double bottom, double right, double top)
-
BoundingBox
public BoundingBox(Integer pageNumber, double left, double bottom, double right, double top)
-
BoundingBox
public BoundingBox(Integer pageNumber, Integer lastPageNumber, double left, double bottom, double right, double top)
-
BoundingBox
public BoundingBox(BoundingBox o)
-
-
Method Detail
-
setPageNumber
public void setPageNumber(Integer pageNumber)
-
setLastPageNumber
public void setLastPageNumber(Integer lastPageNumber)
-
getPageNumber
public Integer getPageNumber()
-
getLastPageNumber
public Integer getLastPageNumber()
-
union
public static BoundingBox union(BoundingBox first, BoundingBox second)
-
union
public BoundingBox union(BoundingBox second)
-
normalize
public BoundingBox normalize()
-
getWidth
public double getWidth()
-
getHeight
public double getHeight()
-
overlaps
public boolean overlaps(BoundingBox other)
-
overlaps
public boolean overlaps(BoundingBox other, double eps)
-
notOverlaps
public boolean notOverlaps(BoundingBox other)
-
notOverlaps
public boolean notOverlaps(BoundingBox other, double eps)
-
contains
public boolean contains(BoundingBox other)
-
contains
public boolean contains(BoundingBox other, double horizontalOffset, double verticalOffset)
-
weaklyContains
public boolean weaklyContains(BoundingBox fullRectangle)
-
cross
public static BoundingBox cross(BoundingBox first, BoundingBox second)
-
cross
public BoundingBox cross(BoundingBox other)
-
cross
public static BoundingBox cross(BoundingBox first, BoundingBox second, double horizontalOffset, double verticalOffset)
-
cross
public BoundingBox cross(BoundingBox other, double horizontalOffset, double verticalOffset)
-
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
public Double getRightX(int pageNumber)
-
getLeftX
public Double getLeftX(int pageNumber)
-
isEmpty
public boolean isEmpty()
-
scale
public BoundingBox scale(double coeffX, double coeffY)
-
move
public BoundingBox move(double xShift, double yShift)
-
setSizes
public void setSizes(double width, double height)
-
init
public void init(BoundingBox rect)
-
getBoundingBox
public BoundingBox getBoundingBox(int pageNumber)
-
init
public void init(double left, double bottom, double right, double top)
-
getLocation
public String getLocation()
-
-