-
public class RectLA android.graphics.Rect with corners in long type instead of int
-
-
Method Summary
Modifier and Type Method Description voidset(long pLeft, long pTop, long pRight, long pBottom)voidset(RectL pOther)voidunion(long x, long y)static booleanintersects(RectL a, RectL b)booleancontains(long x, long y)Returns true if (x,y) is inside the rectangle. voidinset(long dx, long dy)final longwidth()final longheight()StringtoString()booleanequals(Object o)inthashCode()static RectLgetBounds(RectL pIn, long pCenterX, long pCenterY, double pDegrees, RectL pReuse)Rough computation of the smaller RectL that contains a rotated RectL Emulating getClipBounds after a canvas rotationThe code is supposed to be exactly the same as the Rect version, except for int/long static RectgetBounds(Rect pIn, int pCenterX, int pCenterY, double pDegrees, Rect pReuse)Rough computation of the smaller Rect that contains a rotated Rect Emulating getClipBounds after a canvas rotationThe code is supposed to be exactly the same as the RectL version, except for int/longThe code is written to run as fast as possible because it's constantly used when drawing markers static longgetRotatedX(long pX, long pY, double pDegrees, long pCenterX, long pCenterY)Apply a rotation on a point and get the resulting X static longgetRotatedY(long pX, long pY, double pDegrees, long pCenterX, long pCenterY)Apply a rotation on a point and get the resulting Y static longgetRotatedX(long pX, long pY, long pCenterX, long pCenterY, double pCos, double pSin)Apply a rotation on a point and get the resulting X static longgetRotatedY(long pX, long pY, long pCenterX, long pCenterY, double pCos, double pSin)Apply a rotation on a point and get the resulting Y voidoffset(long pDx, long pDy)voidunion(long pLeft, long pTop, long pRight, long pBottom)voidunion(RectL pRect)longcenterX()longcenterY()-
-
Constructor Detail
-
RectL
RectL()
-
RectL
RectL(long pLeft, long pTop, long pRight, long pBottom)
-
RectL
RectL(RectL pOther)
-
-
Method Detail
-
set
void set(long pLeft, long pTop, long pRight, long pBottom)
-
union
void union(long x, long y)
-
intersects
static boolean intersects(RectL a, RectL b)
-
contains
boolean contains(long x, long y)
Returns true if (x,y) is inside the rectangle. Left and top coordinates are consideredinside the bounds, while right and bottom are not.
-
inset
void inset(long dx, long dy)
-
width
final long width()
-
height
final long height()
-
hashCode
int hashCode()
-
getBounds
static RectL getBounds(RectL pIn, long pCenterX, long pCenterY, double pDegrees, RectL pReuse)
Rough computation of the smaller RectL that contains a rotated RectL Emulating getClipBounds after a canvas rotationThe code is supposed to be exactly the same as the Rect version, except for int/long
-
getBounds
static Rect getBounds(Rect pIn, int pCenterX, int pCenterY, double pDegrees, Rect pReuse)
Rough computation of the smaller Rect that contains a rotated Rect Emulating getClipBounds after a canvas rotationThe code is supposed to be exactly the same as the RectL version, except for int/longThe code is written to run as fast as possible because it's constantly used when drawing markers
-
getRotatedX
static long getRotatedX(long pX, long pY, double pDegrees, long pCenterX, long pCenterY)
Apply a rotation on a point and get the resulting X
-
getRotatedY
static long getRotatedY(long pX, long pY, double pDegrees, long pCenterX, long pCenterY)
Apply a rotation on a point and get the resulting Y
-
getRotatedX
static long getRotatedX(long pX, long pY, long pCenterX, long pCenterY, double pCos, double pSin)
Apply a rotation on a point and get the resulting X
-
getRotatedY
static long getRotatedY(long pX, long pY, long pCenterX, long pCenterY, double pCos, double pSin)
Apply a rotation on a point and get the resulting Y
-
offset
void offset(long pDx, long pDy)
-
union
void union(long pLeft, long pTop, long pRight, long pBottom)
-
centerX
long centerX()
-
centerY
long centerY()
-
-
-
-