java.lang.Object
org.verapdf.wcag.algorithms.entities.geometry.BoundingBox
Direct Known Subclasses:
MultiBoundingBox

public class BoundingBox extends Object
  • Field Details

    • pageNumber

      protected Integer pageNumber
    • lastPageNumber

      protected Integer lastPageNumber
    • leftX

      protected double leftX
    • bottomY

      protected double bottomY
    • rightX

      protected double rightX
    • topY

      protected double topY
  • Constructor Details

    • BoundingBox

      public BoundingBox()
    • BoundingBox

      public BoundingBox(Integer pageNumber)
    • BoundingBox

      public BoundingBox(double[] bbox)
    • BoundingBox

      public BoundingBox(Integer pageNumber, double[] bbox)
    • BoundingBox

      public BoundingBox(Integer pageNumber, Integer lastPageNumber, 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 Details

    • 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()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • 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)
    • isOnePageBoundingBox

      public boolean isOnePageBoundingBox()
    • isSeveralPagesBoundingBox

      public boolean isSeveralPagesBoundingBox()
    • init

      public void init(double left, double bottom, double right, double top)
    • getLocation

      public String getLocation()
    • toString

      public String toString()
      Overrides:
      toString in class Object