Java android.graphics RectF fields, constructors, methods, implement or subclass

Example usage for Java android.graphics RectF fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.graphics RectF.

The text is from its open source code.

Constructor

RectF(float left, float top, float right, float bottom)
Create a new rectangle with the specified coordinates.
RectF()
Create a new empty RectF.
RectF(RectF r)
Create a new rectangle, initialized with the values in the specified rectangle (which is left unmodified).
RectF(Rect r)

Method

floatcenterX()
floatcenterY()
booleancontains(float x, float y)
Returns true if (x,y) is inside the rectangle.
booleancontains(RectF r)
Returns true iff the specified rectangle r is inside or equal to this rectangle.
booleanequals(Object o)
floatheight()
voidinset(float dx, float dy)
Inset the rectangle by (dx,dy).
booleanintersect(RectF r)
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.
booleanintersect(float left, float top, float right, float bottom)
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.
booleanintersects(RectF a, RectF b)
Returns true iff the two specified rectangles intersect.
booleanisEmpty()
Returns true if the rectangle is empty (left >= right or top >= bottom)
voidoffset(float dx, float dy)
Offset the rectangle by adding dx to its left and right coordinates, and adding dy to its top and bottom coordinates.
voidoffsetTo(float newLeft, float newTop)
Offset the rectangle to a specific (left, top) position, keeping its width and height the same.
voidround(Rect dst)
Set the dst integer Rect by rounding this rectangle's coordinates to their nearest integer values.
voidroundOut(Rect dst)
Set the dst integer Rect by rounding "out" this rectangle, choosing the floor of top and left, and the ceiling of right and bottom.
voidset(float left, float top, float right, float bottom)
Set the rectangle's coordinates to the specified values.
voidset(RectF src)
Copy the coordinates from src into this rectangle.
voidset(Rect src)
Copy the coordinates from src into this rectangle.
voidsetEmpty()
Set the rectangle to (0,0,0,0)
voidsort()
Swap top/bottom or left/right if there are flipped (i.e.
StringtoString()
voidunion(RectF r)
Update this Rect to enclose itself and the specified rectangle.
floatwidth()