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: RelativeRectAccurate) 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). |
fun bottom(): double |
|
fun centerX(): double |
|
fun centerY(): double |
|
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. 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. 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. |
|
fun convertAspect(aspect: double): double |
|
fun describeContents(): int |
|
fun equals(object: java.lang.Object): boolean |
|
fun flipHorizontal(): void |
|
fun flipVertical(): void |
|
fun getMultiRect(ref: Rect): MultiRect fun getMultiRect(multiRect: MultiRect, ref: Rect): MultiRect |
|
fun getRectF(ref: Rect): RectF fun getRectF(ref: RectF): RectF |
|
static fun getRelativeRectCenterInside(imageWidthValue: float, imageHeightValue: float, viewWidthValue: float, viewHeightValue: float): RelativeRectFast |
|
fun getSourceAspect(): double |
|
fun hashCode(): int |
|
fun height(): double |
|
fun inset(dx: double, dy: double): void
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. |
|
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() 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() |
|
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 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(). |
|
fun isEmpty(): boolean
Returns true if the rectangle is empty (left >= right or top >= bottom) |
|
fun left(): double |
|
fun limitTo(left: double, top: double, right: double, bottom: double): void fun limitTo(left: double, top: double, right: double, bottom: double, saveSize: boolean): void |
|
fun offset(dx: double, dy: double): void
Offset the rectangle by adding dx to its left and right coordinates, and adding dy to its top and bottom coordinates. |
|
fun offsetTo(newLeft: double, newTop: double): void
Offset the rectangle to a specific (left, top) position, keeping its width and height the same. |
|
fun printShortString(pw: java.io.PrintWriter): void
Print short representation to given writer. |
|
fun right(): double |
|
fun round(ref: RectF): Rect fun round(ref: Rect): Rect
Set the dst integer Rect by rounding this rectangle's coordinates to their nearest integer values. |
|
fun roundOut(ref: RectF): Rect 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. |
|
fun scale(scale: double): void |
|
fun scaleInCenter(scale: double): void |
|
fun set(ref: RectF, left: float, top: float, right: float, bottom: float): void fun set(ref: Rect, left: float, top: float, right: float, bottom: float): void fun set(left: double, top: double, right: double, bottom: double): void
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. fun set(src: RelativeRectFast): void fun set(ref: RectF, src: RectF): void fun set(ref: RectF, src: Rect): void fun set(ref: Rect, src: Rect): void fun set(ref: Rect, src: RectF): void
Copy the coordinates from src into this rectangle. |
|
fun setEmpty(): void
Set the rectangle to (0,0,0,0) |
|
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() |
|
fun setRef(ref: RectF): void fun setRef(ref: Rect): void |
|
fun setSourceAspect(sourceAspect: double): void |
|
fun similar(object: java.lang.Object): boolean |
|
fun similarValues(thatLeft: double, thatTop: double, thatRight: double, thatBottom: double): boolean |
|
fun sort(): void
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. |
|
fun top(): double |
|
fun toShortString(): java.lang.String fun toShortString(sb: java.lang.StringBuilder): java.lang.String
Return a string representation of the rectangle in a compact form. |
|
fun toString(): java.lang.String |
|
fun translateCoordinateSystem(newCoordinateSystem: RelativeRectFast): RelativeRectFast |
|
fun union(r: RelativeRectFast): void fun union(left: double, top: double, right: double, bottom: double): void
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. fun union(x: double, y: double): void
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 |
|
fun writeToParcel(dest: Parcel, flags: int): void |
bottom |
|
CREATOR |
|
left |
|
rangeOffsetX |
|
rangeOffsetY |
|
rangeScaleX |
|
rangeScaleY |
|
right |
|
sourceAspect |
|
top |