Class Quadrangle
Stores a set of four Points that represent a Quadrangle region.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final QuadrangleRepresents aQuadrangleclass with its properties left uninitialized. -
Constructor Summary
ConstructorsConstructorDescriptionQuadrangle(android.graphics.Point leftTop, android.graphics.Point rightTop, android.graphics.Point rightBottom, android.graphics.Point leftBottom) Initializes a new instance of theQuadranglestructure with the describing points. -
Method Summary
Modifier and TypeMethodDescriptionclone()booleancontains(int x, int y) Determines if the specified point is contained within thisQuadrangleclass.booleancontains(android.graphics.Point pt) Determines if the specifiedPointis contained within thisQuadrangleclass.booleancontains(android.graphics.Rect rect) Determines if the specifiedRectangleis contained or intersect thisQuadrangleclass.booleancontains(Quadrangle quad) Determines if the specifiedQuadrangleis contained or intersect thisQuadrangleclass.booleanReturns a value indicating whether this instance is equal to a specifiedQuadranglevalue.android.graphics.RectCreatesRectanglebounding thisQuadrangleandroid.graphics.PointGets left-bottom cornerPointofQuadrangleregionandroid.graphics.PointGets left-top cornerPointofQuadrangleregionandroid.graphics.PointGets right-bottom cornerPointofQuadrangleregionandroid.graphics.PointGets right-top cornerPointofQuadrangleregioninthashCode()Returns the hash code for this instance.booleanisEmpty()Tests whether allPoints of thisQuadranglehave values of zero.voidsetLeftBottom(android.graphics.Point value) Gets left-bottom cornerPointofQuadrangleregionvoidsetLeftTop(android.graphics.Point value) Gets left-top cornerPointofQuadrangleregionvoidsetRightBottom(android.graphics.Point value) Gets right-bottom cornerPointofQuadrangleregionvoidsetRightTop(android.graphics.Point value) Gets right-top cornerPointofQuadrangleregiontoString()Returns a human-readable string representation of thisQuadrangle.
-
Field Details
-
EMPTY
Represents a
Value:Quadrangleclass with its properties left uninitialized.Quadrangle
-
-
Constructor Details
-
Quadrangle
public Quadrangle() -
Quadrangle
public Quadrangle(android.graphics.Point leftTop, android.graphics.Point rightTop, android.graphics.Point rightBottom, android.graphics.Point leftBottom) Initializes a new instance of the
Quadranglestructure with the describing points.- Parameters:
leftTop- APointthat represents the left-top corner of the Quadrangle.rightTop- APointthat represents the right-top corner of the Quadrangle.rightBottom- APointthat represents the right-bottom corner of the Quadrangle.leftBottom- APointthat represents the left-bottom corner of the Quadrangle.
-
-
Method Details
-
getLeftTop
public android.graphics.Point getLeftTop()Gets left-top corner
Value: A left-top cornerPointofQuadrangleregionPointofQuadrangleregion -
setLeftTop
public void setLeftTop(android.graphics.Point value) Gets left-top corner
Value: A left-top cornerPointofQuadrangleregionPointofQuadrangleregion -
getRightTop
public android.graphics.Point getRightTop()Gets right-top corner
Value: A right-top cornerPointofQuadrangleregionPointofQuadrangleregion -
setRightTop
public void setRightTop(android.graphics.Point value) Gets right-top corner
Value: A right-top cornerPointofQuadrangleregionPointofQuadrangleregion -
getRightBottom
public android.graphics.Point getRightBottom()Gets right-bottom corner
Value: A right-bottom cornerPointofQuadrangleregionPointofQuadrangleregion -
setRightBottom
public void setRightBottom(android.graphics.Point value) Gets right-bottom corner
Value: A right-bottom cornerPointofQuadrangleregionPointofQuadrangleregion -
getLeftBottom
public android.graphics.Point getLeftBottom()Gets left-bottom corner
Value: A left-bottom cornerPointofQuadrangleregionPointofQuadrangleregion -
setLeftBottom
public void setLeftBottom(android.graphics.Point value) Gets left-bottom corner
Value: A left-bottom cornerPointofQuadrangleregionPointofQuadrangleregion -
isEmpty
public boolean isEmpty()Tests whether all
Value: ReturnsPoints of thisQuadranglehave values of zero.<b>true</b>if allPoints of thisQuadranglehave values of zero; otherwise,<b>false</b>. -
contains
public boolean contains(android.graphics.Point pt) Determines if the specified
Pointis contained within thisQuadrangleclass.- Parameters:
pt- ThePointto test.- Returns:
- Returns
<b>true</b>ifPointis contained within thisQuadrangleclass; otherwise,<b>false</b>.
-
contains
public boolean contains(int x, int y) Determines if the specified point is contained within this
Quadrangleclass.- Parameters:
x- The x point cordinate.y- The y point cordinate.- Returns:
- Returns
<b>true</b>if point is contained within thisQuadrangleclass; otherwise,<b>false</b>.
-
contains
Determines if the specified
Quadrangleis contained or intersect thisQuadrangleclass.- Parameters:
quad- TheQuadrangleto test.- Returns:
- Returns
<b>true</b>ifQuadrangleis contained or intersect thisQuadrangleclass; otherwise,<b>false</b>.
-
contains
public boolean contains(android.graphics.Rect rect) Determines if the specified
Rectangleis contained or intersect thisQuadrangleclass.- Parameters:
rect- TheRectangleto test.- Returns:
- Returns
<b>true</b>ifRectangleis contained or intersect thisQuadrangleclass; otherwise,<b>false</b>.
-
equals
Returns a value indicating whether this instance is equal to a specified
Quadranglevalue. -
hashCode
public int hashCode()Returns the hash code for this instance.
-
toString
Returns a human-readable string representation of this
Quadrangle. -
getBoundingRectangle
public android.graphics.Rect getBoundingRectangle()Creates
Rectanglebounding thisQuadrangle- Returns:
- returns
Rectanglebounding thisQuadrangle
-
clone
-