Package ghidra.util.database.spatial.rect

# Interface Rectangle2D<X,Y,R extends Rectangle2D<X,Y,R>>

All Superinterfaces:
  `BoundedShape<R>`, `BoundingShape<R>`

All Known Subinterfaces:
  `TraceAddressSnapRange`

All Known Implementing Classes:
  `AbstractDBTraceCodeUnit`, `AbstractDBTracePropertyMap.DBTraceIntPropertyMapEntry`, `AbstractDBTracePropertyMap.DBTraceLongPropertyMapEntry`, `AbstractDBTracePropertyMap.DBTraceSaveablePropertyMapEntry`, `AbstractDBTracePropertyMap.DBTraceStringPropertyMapEntry`, `AbstractDBTracePropertyMap.DBTraceVoidPropertyMapEntry`, `DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData`, `DBTraceAddressSnapRangePropertyMapTree.DBTraceAddressSnapRangePropertyMapNode`, `DBTraceBookmark`, `DBTraceCommentAdapter.DBTraceCommentEntry`, `DBTraceData`, `DBTraceDataSettingsAdapter.DBTraceSettingsEntry`, `DBTraceEquateSpace.DBTraceEquateReference`, `DBTraceInstruction`, `DBTraceReferenceSpace.DBTraceReferenceEntry`, `DBTraceReferenceSpace.DBTraceXRefEntry`, `DBTraceRegisterContextManager.DBTraceRegisterContextEntry`, `DBTraceSymbolManager.DBTraceSymbolIDEntry`, `ImmutableRectangle2D`, `ImmutableTraceAddressSnapRange`

public interface Rectangle2D<X,Y,R extends Rectangle2D<X,Y,R>> extends BoundingShape<R>

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default double`
  `computeAreaIntersection(R shape)`
  `default double`
  `computeAreaUnionBounds(R shape)`
  `default double`
  `computeCentroidDistance(R shape)`
  `default boolean`
  `contains(Point2D<X,Y> point)`
  `default boolean`
  `contains(X x, Y y)`
  `default boolean`
  `doEquals(Object obj)`
  `default int`
  `doHashCode()`
  `default boolean`
  `enclosedBy(R shape)`
  Check if this rectangle is enclosed by another rectangle
  `static <X, Y> boolean`
  `encloses(Rectangle2D<X,Y,?> outer, Rectangle2D<X,Y,?> inner)`
  `default boolean`
  `encloses(R shape)`
  Check if this rectangle encloses another rectangle
  `default double`
  `getArea()`
  `default Point2D<X,Y>`
  `getCenter()`
  `default double`
  `getMargin()`
  `EuclideanSpace2D<X,Y>`
  `getSpace()`
  `X`
  `getX1()`
  `X`
  `getX2()`
  `Y`
  `getY1()`
  `Y`
  `getY2()`
  `R`
  `immutable(X x1, X x2, Y y1, Y y2)`
  `default R`
  `intersection(R shape)`
  `default boolean`
  `intersects(R shape)`
  `default R`
  `unionBounds(R shape)`

  ### Methods inherited from interface ghidra.util.database.spatial.BoundedShape

  `description, getBounds`

- ## Method Details

  - ### encloses

    static <X, Y> boolean encloses(Rectangle2D<X,Y,?> outer, Rectangle2D<X,Y,?> inner)

  - ### getX1

    X getX1()

  - ### getX2

    X getX2()

  - ### getY1

    Y getY1()

  - ### getY2

    Y getY2()

  - ### getSpace

    EuclideanSpace2D<X,Y> getSpace()

  - ### doEquals

    default boolean doEquals(Object obj)

  - ### doHashCode

    default int doHashCode()

  - ### contains

    default boolean contains(Point2D<X,Y> point)

  - ### contains

    default boolean contains(X x, Y y)

  - ### getArea

    default double getArea()
    Specified by:
      `getArea` in interface `BoundingShape<X>`

  - ### getMargin

    default double getMargin()
    Specified by:
      `getMargin` in interface `BoundingShape<X>`

  - ### getCenter

    default Point2D<X,Y> getCenter()

  - ### computeAreaUnionBounds

    default double computeAreaUnionBounds(R shape)
    Specified by:
      `computeAreaUnionBounds` in interface `BoundingShape<X>`

  - ### computeAreaIntersection

    default double computeAreaIntersection(R shape)
    Specified by:
      `computeAreaIntersection` in interface `BoundingShape<X>`

  - ### computeCentroidDistance

    default double computeCentroidDistance(R shape)
    Specified by:
      `computeCentroidDistance` in interface `BoundingShape<X>`

  - ### immutable

    R immutable(X x1, X x2, Y y1, Y y2)

  - ### unionBounds

    default R unionBounds(R shape)
    Specified by:
      `unionBounds` in interface `BoundingShape<X>`

  - ### intersects

    default boolean intersects(R shape)

  - ### intersection

    default R intersection(R shape)

  - ### encloses

    default boolean encloses(R shape)
    Check if this rectangle encloses another rectangle
    Specified by:
      `encloses` in interface `BoundingShape<X>`
    Parameters:
      `shape` - the other (presumably-inner) rectangle
    Returns:
      true if this rectangle encloses the other

  - ### enclosedBy

    default boolean enclosedBy(R shape)
    Check if this rectangle is enclosed by another rectangle
    Parameters:
      `shape` - the other (presumably-outer) rectangle
    Returns:
      true if this rectangle is enclosed by the other