Quadrangle

Inheritance: java.lang.Object

public class Quadrangle

Stores a set of four Point s that represent a Quadrangle region.

Constructors

ConstructorDescription
Quadrangle()
Quadrangle(Point leftTop, Point rightTop, Point rightBottom, Point leftBottom)Initializes a new instance of the Quadrangle structure with the describing points.

Fields

FieldDescription
EMPTYRepresents a Quadrangle class with its properties left uninitialized.

Methods

MethodDescription
clone()
contains(Point pt)Determines if the specified Point is contained within this Quadrangle class.
contains(Rect rect)Determines if the specified Rectangle is contained or intersect this Quadrangle class.
contains(Quadrangle quad)Determines if the specified Quadrangle is contained or intersect this Quadrangle class.
contains(int x, int y)Determines if the specified point is contained within this Quadrangle class.
equals(Object obj)Returns a value indicating whether this instance is equal to a specified Quadrangle value.
getBoundingRectangle()Creates Rectangle bounding this Quadrangle
getClass()
getLeftBottom()Gets left-bottom corner Point of Quadrangle region
getLeftTop()Gets left-top corner Point of Quadrangle region
getRightBottom()Gets right-bottom corner Point of Quadrangle region
getRightTop()Gets right-top corner Point of Quadrangle region
hashCode()Returns the hash code for this instance.
isEmpty()Tests whether all Point s of this Quadrangle have values of zero.
notify()
notifyAll()
setLeftBottom(Point value)Gets left-bottom corner Point of Quadrangle region
setLeftTop(Point value)Gets left-top corner Point of Quadrangle region
setRightBottom(Point value)Gets right-bottom corner Point of Quadrangle region
setRightTop(Point value)Gets right-top corner Point of Quadrangle region
toString()Returns a human-readable string representation of this Quadrangle .
wait()
wait(long arg0)
wait(long arg0, int arg1)

Quadrangle()

public Quadrangle()

Quadrangle(Point leftTop, Point rightTop, Point rightBottom, Point leftBottom)

public Quadrangle(Point leftTop, Point rightTop, Point rightBottom, Point leftBottom)

Initializes a new instance of the Quadrangle structure with the describing points.

Parameters:

ParameterTypeDescription
leftTopandroid.graphics.PointA Point that represents the left-top corner of the Quadrangle.
rightTopandroid.graphics.PointA Point that represents the right-top corner of the Quadrangle.
rightBottomandroid.graphics.PointA Point that represents the right-bottom corner of the Quadrangle.
leftBottomandroid.graphics.PointA Point that represents the left-bottom corner of the Quadrangle.

EMPTY

public static final Quadrangle EMPTY

Represents a Quadrangle class with its properties left uninitialized.

Value: Quadrangle

clone()

public Quadrangle clone()

Returns: Quadrangle

contains(Point pt)

public boolean contains(Point pt)

Determines if the specified Point is contained within this Quadrangle class.

Parameters:

ParameterTypeDescription
ptandroid.graphics.PointThe Point to test.

Returns: boolean - Returns true if Point is contained within this Quadrangle class; otherwise, false .

contains(Rect rect)

public boolean contains(Rect rect)

Determines if the specified Rectangle is contained or intersect this Quadrangle class.

Parameters:

ParameterTypeDescription
rectandroid.graphics.RectThe Rectangle to test.

Returns: boolean - Returns true if Rectangle is contained or intersect this Quadrangle class; otherwise, false .

contains(Quadrangle quad)

public boolean contains(Quadrangle quad)

Determines if the specified Quadrangle is contained or intersect this Quadrangle class.

Parameters:

ParameterTypeDescription
quadQuadrangleThe Quadrangle to test.

Returns: boolean - Returns true if Quadrangle is contained or intersect this Quadrangle class; otherwise, false .

contains(int x, int y)

public boolean contains(int x, int y)

Determines if the specified point is contained within this Quadrangle class.

Parameters:

ParameterTypeDescription
xintThe x point cordinate.
yintThe y point cordinate.

Returns: boolean - Returns true if point is contained within this Quadrangle class; otherwise, false .

equals(Object obj)

public boolean equals(Object obj)

Returns a value indicating whether this instance is equal to a specified Quadrangle value.

Parameters:

ParameterTypeDescription
objjava.lang.ObjectAn Quadrangle value to compare to this instance.

Returns: boolean - true if obj has the same value as this instance; otherwise, false .

getBoundingRectangle()

public Rect getBoundingRectangle()

Creates Rectangle bounding this Quadrangle

Returns: android.graphics.Rect - returns Rectangle bounding this Quadrangle

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getLeftBottom()

public Point getLeftBottom()

Gets left-bottom corner Point of Quadrangle region

Value: A left-bottom corner Point of Quadrangle region

Returns: android.graphics.Point

getLeftTop()

public Point getLeftTop()

Gets left-top corner Point of Quadrangle region

Value: A left-top corner Point of Quadrangle region

Returns: android.graphics.Point

getRightBottom()

public Point getRightBottom()

Gets right-bottom corner Point of Quadrangle region

Value: A right-bottom corner Point of Quadrangle region

Returns: android.graphics.Point

getRightTop()

public Point getRightTop()

Gets right-top corner Point of Quadrangle region

Value: A right-top corner Point of Quadrangle region

Returns: android.graphics.Point

hashCode()

public int hashCode()

Returns the hash code for this instance.

Returns: int - A 32-bit signed integer hash code.

isEmpty()

public boolean isEmpty()

Tests whether all Point s of this Quadrangle have values of zero.

Value: Returns true if all Point s of this Quadrangle have values of zero; otherwise, false .

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setLeftBottom(Point value)

public void setLeftBottom(Point value)

Gets left-bottom corner Point of Quadrangle region

Value: A left-bottom corner Point of Quadrangle region

Parameters:

ParameterTypeDescription
valueandroid.graphics.Point

setLeftTop(Point value)

public void setLeftTop(Point value)

Gets left-top corner Point of Quadrangle region

Value: A left-top corner Point of Quadrangle region

Parameters:

ParameterTypeDescription
valueandroid.graphics.Point

setRightBottom(Point value)

public void setRightBottom(Point value)

Gets right-bottom corner Point of Quadrangle region

Value: A right-bottom corner Point of Quadrangle region

Parameters:

ParameterTypeDescription
valueandroid.graphics.Point

setRightTop(Point value)

public void setRightTop(Point value)

Gets right-top corner Point of Quadrangle region

Value: A right-top corner Point of Quadrangle region

Parameters:

ParameterTypeDescription
valueandroid.graphics.Point

toString()

public String toString()

Returns a human-readable string representation of this Quadrangle .

Returns: java.lang.String - A string that represents this Quadrangle .

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int