@JsType(isNative=true) public class Bounds extends Object
Modifier and Type | Method and Description |
---|---|
Boolean |
contains(Bounds otherBounds)
Returns true if the rectangle contains the given one.
|
Boolean |
contains(Point point)
Returns true if the rectangle contains the given point.
|
void |
extend(Point point)
Extends the bounds to contain the given point.
|
Point |
getCenter()
Returns the center point of the bounds.
|
Point |
getSize()
Returns the size of the given bounds.
|
Boolean |
intersects(Bounds otherBounds)
Returns true if the rectangle intersects the given bounds.
|
Boolean |
isValid()
Returns true if the bounds are properly initialized.
|
@JsMethod public void extend(Point point)
point
- the point@JsMethod public Point getCenter()
@JsMethod public Boolean contains(Bounds otherBounds)
otherBounds
- the bounds@JsMethod public Boolean contains(Point point)
the
- point@JsMethod public Boolean intersects(Bounds otherBounds)
otherBounds
- the other bounds@JsMethod public Boolean isValid()
@JsMethod public Point getSize()
Copyright © 2018 G-Widgets. All rights reserved.