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(int pageNumber)BoundingBox(int pageNumber, double[] bbox)BoundingBox(int pageNumber, double left, double bottom, double right, double top)BoundingBox(int pageNumber, int lastPageNumber, double[] bbox)BoundingBox(int pageNumber, int 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)static BoundingBoxcross(BoundingBox first, BoundingBox second)booleanequals(Object o)doublegetArea()doublegetBottomY()doublegetCenterX()doublegetCenterY()doublegetHeight()IntegergetLastPageNumber()doublegetLeftX()StringgetLocation()IntegergetPageNumber()doublegetRightX()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)voidsetLastPageNumber(int lastPageNumber)voidsetPageNumber(int pageNumber)voidsetSizes(double width, double height)StringtoString()BoundingBoxunion(BoundingBox second)static BoundingBoxunion(BoundingBox first, BoundingBox second)booleanweaklyContains(BoundingBox fullRectangle)
-
-
-
Constructor Detail
-
BoundingBox
public BoundingBox()
-
BoundingBox
public BoundingBox(int pageNumber)
-
BoundingBox
public BoundingBox(double[] bbox)
-
BoundingBox
public BoundingBox(int pageNumber, double[] bbox)
-
BoundingBox
public BoundingBox(int pageNumber, int lastPageNumber, double[] bbox)
-
BoundingBox
public BoundingBox(double left, double bottom, double right, double top)
-
BoundingBox
public BoundingBox(int pageNumber, double left, double bottom, double right, double top)
-
BoundingBox
public BoundingBox(int pageNumber, int lastPageNumber, double left, double bottom, double right, double top)
-
BoundingBox
public BoundingBox(BoundingBox o)
-
-
Method Detail
-
setPageNumber
public void setPageNumber(int pageNumber)
-
setLastPageNumber
public void setLastPageNumber(int 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)
-
getArea
public double getArea()
-
getBottomY
public double getBottomY()
-
getTopY
public double getTopY()
-
getLeftX
public double getLeftX()
-
getRightX
public double getRightX()
-
getCenterX
public double getCenterX()
-
getCenterY
public double getCenterY()
-
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)
-
init
public void init(double left, double bottom, double right, double top)
-
getLocation
public String getLocation()
-
-