open class RelativeRectFast : Parcelable
RelativeRectFast()
Create a new empty BigRect. All coordinates are initialized to 0. RelativeRectFast(ref: RectF!, left: Float, top: Float, right: Float, bottom: Float) RelativeRectFast(ref: Rect!, left: Float, top: Float, right: Float, bottom: Float) RelativeRectFast(in: Parcel!) RelativeRectFast(left: Double, top: Double, right: Double, bottom: Double, sourceAspect: Double)
Create a new rectangle with the specified coordinates. Note: no range checking is performed, so the caller must ensure that left <= right and top <= bottom. RelativeRectFast(r: RelativeRectFast!) RelativeRectFast(ref: Rect!, r: Rect!) RelativeRectFast(ref: Rect!, r: RectF!) RelativeRectFast(ref: RectF!, r: Rect!) RelativeRectFast(ref: RectF!, r: RectF!)
Create a new rectangle, initialized with the values in the specified rectangle (which is left unmodified). |
var bottom: Double |
|
static val CREATOR: Creator! |
|
var left: Double |
|
var rangeOffsetX: Double |
|
var rangeOffsetY: Double |
|
var rangeScaleX: Double |
|
var rangeScaleY: Double |
|
var right: Double |
|
var sourceAspect: Double |
|
var top: Double |
open fun bottom(): Double |
|
fun centerX(): Double |
|
fun centerY(): Double |
|
open fun contains(x: Double, y: Double): Boolean
Returns true if (x,y) is inside the rectangle. The left and top are considered to be inside, while the right and bottom are not. This means that for a x,y to be contained: left <= x < right and top <= y < bottom. An empty rectangle never contains any point. open fun contains(left: Double, top: Double, right: Double, bottom: Double): Boolean
Returns true iff the 4 specified sides of a rectangle are inside or equal to this rectangle. i.e. is this rectangle a superset of the specified rectangle. An empty rectangle never contains another rectangle. open fun contains(r: RelativeRectFast!): Boolean
Returns true iff the specified rectangle r is inside or equal to this rectangle. An empty rectangle never contains another rectangle. |
|
open fun convertAspect(aspect: Double): Double |
|
open fun describeContents(): Int |
|
open fun equals(object: Any!): Boolean |
|
open fun flipHorizontal(): Unit |
|
open fun flipVertical(): Unit |
|
open fun flipYCords(): Unit |
|
open fun getMultiRect(multiRect: MultiRect!, ref: Rect!): MultiRect! |
|
open fun getRectF(ref: Rect!): RectF! open fun getRectF(ref: RectF!): RectF! |
|
open static fun getRelativeRectCenterInside(imageWidthValue: Float, imageHeightValue: Float, viewWidthValue: Float, viewHeightValue: Float): RelativeRectFast! |
|
open fun getSourceAspect(): Double |
|
open fun hashCode(): Int |
|
fun height(): Double |
|
open fun inset(dx: Double, dy: Double): Unit
Inset the rectangle by (dx,dy). If dx is positive, then the sides are moved inwards, making the rectangle narrower. If dx is negative, then the sides are moved outwards, making the rectangle wider. The same holds true for dy and the top and bottom. |
|
open fun intersect(r: RelativeRectFast!): Boolean
If the specified rectangle intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle. No check is performed to see if either rectangle is empty. To just test for intersection, use intersects() open fun intersect(left: Double, top: Double, right: Double, bottom: Double): Boolean
If the rectangle specified by left,top,right,bottom intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle. No check is performed to see if either rectangle is empty. Note: To just test for intersection, use intersects() |
|
open fun intersects(left: Double, top: Double, right: Double, bottom: Double): Boolean
Returns true if this rectangle intersects the specified rectangle. In no event is this rectangle modified. No check is performed to see if either rectangle is empty. To record the intersection, use intersect() or setIntersect(). open static fun intersects(a: RelativeRectFast!, b: RelativeRectFast!): Boolean
Returns true iff the two specified rectangles intersect. In no event are either of the rectangles modified. To record the intersection, use intersect() or setIntersect(). |
|
fun isEmpty(): Boolean
Returns true if the rectangle is empty (left >= right or top >= bottom) |
|
open fun left(): Double |
|
open fun limitTo(left: Double, top: Double, right: Double, bottom: Double): Unit open fun limitTo(left: Double, top: Double, right: Double, bottom: Double, saveSize: Boolean): Unit |
|
open fun obtainMultiRect(ref: MultiRect!): MultiRect! open fun obtainMultiRect(x: Double, y: Double, width: Double, height: Double): MultiRect! open fun obtainMultiRect(x: Int, y: Int, width: Int, height: Int): MultiRect! open fun obtainMultiRect(ref: Rect!): MultiRect! |
|
open fun offset(dx: Double, dy: Double): Unit
Offset the rectangle by adding dx to its left and right coordinates, and adding dy to its top and bottom coordinates. |
|
open fun offsetTo(newLeft: Double, newTop: Double): Unit
Offset the rectangle to a specific (left, top) position, keeping its width and height the same. |
|
open fun printShortString(pw: PrintWriter!): Unit
Print short representation to given writer. |
|
open fun right(): Double |
|
open fun round(ref: RectF!): Rect! open fun round(ref: Rect!): Rect!
Set the dst integer Rect by rounding this rectangle's coordinates to their nearest integer values. |
|
open fun roundOut(ref: RectF!): Rect! open fun roundOut(ref: Rect!): Rect!
Set the dst integer Rect by rounding "out" this rectangle, choosing the floor of top and left, and the ceiling of right and bottom. |
|
open fun scale(scale: Double): Unit |
|
open fun scaleInCenter(scale: Double): Unit |
|
open fun set(ref: RectF!, left: Float, top: Float, right: Float, bottom: Float): Unit open fun set(ref: Rect!, left: Float, top: Float, right: Float, bottom: Float): Unit open fun set(left: Double, top: Double, right: Double, bottom: Double): Unit
Set the rectangle's coordinates to the specified values. Note: no range checking is performed, so it is up to the caller to ensure that left <= right and top <= bottom. open fun set(src: RelativeRectFast!): Unit open fun set(ref: RectF!, src: RectF!): Unit open fun set(ref: RectF!, src: Rect!): Unit open fun set(ref: Rect!, src: Rect!): Unit open fun set(ref: Rect!, src: RectF!): Unit
Copy the coordinates from src into this rectangle. |
|
open fun setEmpty(): Unit
Set the rectangle to (0,0,0,0) |
|
open fun setIntersect(a: RelativeRectFast!, b: RelativeRectFast!): Boolean
If rectangles a and b intersect, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle. No check is performed to see if either rectangle is empty. To just test for intersection, use intersects() |
|
open fun setRef(ref: RectF!): Unit open fun setRef(x: Double, y: Double, width: Double, height: Double): Unit open fun setRef(ref: Rect!): Unit |
|
open fun setSourceAspect(sourceAspect: Double): Unit |
|
open fun similar(object: Any!): Boolean |
|
open fun similarValues(thatLeft: Double, thatTop: Double, thatRight: Double, thatBottom: Double): Boolean |
|
open fun sort(): Unit
Swap top/bottom or left/right if there are flipped (i.e. left > right and/or top > bottom). This can be called if the edges are computed separately, and may have crossed over each other. If the edges are already correct (i.e. left <= right and top <= bottom) then nothing is done. |
|
open fun top(): Double |
|
open fun toShortString(): String! open fun toShortString(sb: StringBuilder!): String!
Return a string representation of the rectangle in a compact form. |
|
open fun toString(): String! |
|
open fun translateCoordinateSystem(newCoordinateSystem: RelativeRectFast!): RelativeRectFast! |
|
open fun union(r: RelativeRectFast!): Unit open fun union(left: Double, top: Double, right: Double, bottom: Double): Unit
Update this Rect to enclose itself and the specified rectangle. If the specified rectangle is empty, nothing is done. If this rectangle is empty it is set to the specified rectangle. open fun union(x: Double, y: Double): Unit
Update this Rect to enclose itself and the [x,y] coordinate. There is no check to see that this rectangle is non-empty. |
|
fun width(): Double |
|
open fun writeToParcel(dest: Parcel!, flags: Int): Unit |