![]() |
AI2 Component
(Version nb184)
|
Public Member Functions | |
BoundingBox (double l, double t, double r, double b) | |
boolean | intersectDestructively (BoundingBox bb) |
double | getLeft () |
double | getTop () |
double | getRight () |
double | getBottom () |
String | toString () |
Bounding box abstraction, similar to android.graphics.Rect.
Definition at line 13 of file BoundingBox.java.
com.google.appinventor.components.runtime.util.BoundingBox.BoundingBox | ( | double | l, |
double | t, | ||
double | r, | ||
double | b | ||
) |
Constructor for a bounding box. All coordinates are inclusive.
l | leftmost x-coordinate |
t | topmost y-coordinate |
r | rightmost x-coordinate |
b | bottommost y-coordinate |
Definition at line 27 of file BoundingBox.java.
double com.google.appinventor.components.runtime.util.BoundingBox.getBottom | ( | ) |
Gets the bottommost y-coordinate
Definition at line 96 of file BoundingBox.java.
double com.google.appinventor.components.runtime.util.BoundingBox.getLeft | ( | ) |
Gets the leftmost x-coordinate
Definition at line 69 of file BoundingBox.java.
double com.google.appinventor.components.runtime.util.BoundingBox.getRight | ( | ) |
Gets the rightmost x-coordinate
Definition at line 87 of file BoundingBox.java.
double com.google.appinventor.components.runtime.util.BoundingBox.getTop | ( | ) |
Gets the uppermost y-coordinate
Definition at line 78 of file BoundingBox.java.
boolean com.google.appinventor.components.runtime.util.BoundingBox.intersectDestructively | ( | BoundingBox | bb | ) |
Determines whether this bounding box intersects with the passed bounding box and, if so, mutates the bounding box to be the intersection. This was designed to behave the same as android.graphics.Rect#intersect(android.graphics.Rect).
bb | bounding box to intersect with this bounding box |
Definition at line 43 of file BoundingBox.java.
String com.google.appinventor.components.runtime.util.BoundingBox.toString | ( | ) |
Definition at line 100 of file BoundingBox.java.