Quadrangle

Quadrangle class

Stores a set of four Points that represent a Quadrangle region.

new Quadrangle(leftTop, rightTop, rightBottom, leftBottom)

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

ParameterDescription
leftTopA Point that represents the left-top corner of the Quadrangle.
rightTopA Point that represents the right-top corner of the Quadrangle.
rightBottomA Point that represents the right-bottom corner of the Quadrangle.
leftBottomA Point that represents the left-bottom corner of the Quadrangle.

Methods

NameDescription
contains(pt)Determines if the specified Point is contained within this Quadrangle structure.
containsPoint(x, y)Determines if the specified point is contained within this Quadrangle structure.
containsQuadrangle(quad)Determines if the specified Quadrangle is contained or intersect this Quadrangle structure.
containsRectangle(rect)Determines if the specified Rectangle is contained or intersect this Quadrangle structure.
equals(other)Returns a value indicating whether this instance is equal to a specified Quadrangle value.
getBoundingRectangle()Creates Rectangle bounding this Quadrangle
getLeftBottom()Gets left-bottom corner Point of Quadrangle regionValue: A left-bottom corner Point of Quadrangle region
getLeftTop()Gets left-top corner Point of Quadrangle regionValue: A left-top corner Point of Quadrangle region
getRightBottom()Gets right-bottom corner Point of Quadrangle regionValue: A right-bottom corner Point of Quadrangle region
getRightTop()Gets right-top corner Point of Quadrangle regionValue: A right-top corner Point of Quadrangle region
hashCode()Returns the hash code for this instance.
isEmpty()Tests whether all Points of this Quadrangle have values of zero.Value: Returns true if all Points of this Quadrangle hav
setLeftBottom()Sets left-bottom corner Point of Quadrangle regionValue: A left-bottom corner Point of Quadrangle region
setLeftTop()Sets left-top corner Point of Quadrangle regionValue: A left-top corner Point of Quadrangle region
setRightBottom()Sets right-bottom corner Point of Quadrangle regionValue: A right-bottom corner Point of Quadrangle region
setRightTop()Sets right-top corner Point of Quadrangle regionValue: A right-top corner Point of Quadrangle region
toString()Returns a human-readable string representation of this Quadrangle.

contains(pt)

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

ParameterDescription
ptThe Point to test.

Returns: true if Point is contained within this Quadrangle structure; otherwise, false.

containsPoint(x, y)

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

ParameterDescription
xThe x point cordinate.
yThe y point cordinate.

Returns: Returns true if point is contained within this Quadrangle structure; otherwise, false.

containsQuadrangle(quad)

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

ParameterDescription
quadThe Quadrangle to test.

Returns: Returns true if Quadrangle is contained or intersect this Quadrangle structure; otherwise, false.

containsRectangle(rect)

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

ParameterDescription
rectThe Rectangle to test.

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

equals(other)

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

ParameterDescription
otherAn Quadrangle value to compare to this instance.

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

getBoundingRectangle()

Creates Rectangle bounding this Quadrangle

Returns: returns Rectangle bounding this Quadrangle

getLeftBottom()

Gets left-bottom corner Point of Quadrangle regionValue: A left-bottom corner Point of Quadrangle region

getLeftTop()

Gets left-top corner Point of Quadrangle regionValue: A left-top corner Point of Quadrangle region

getRightBottom()

Gets right-bottom corner Point of Quadrangle regionValue: A right-bottom corner Point of Quadrangle region

getRightTop()

Gets right-top corner Point of Quadrangle regionValue: A right-top corner Point of Quadrangle region

hashCode()

Returns the hash code for this instance.

Returns: A 32-bit signed integer hash code.

isEmpty()

Tests whether all Points of this Quadrangle have values of zero.Value: Returns true if all Points of this Quadrangle have values of zero; otherwise, false.

setLeftBottom()

Sets left-bottom corner Point of Quadrangle regionValue: A left-bottom corner Point of Quadrangle region

setLeftTop()

Sets left-top corner Point of Quadrangle regionValue: A left-top corner Point of Quadrangle region

setRightBottom()

Sets right-bottom corner Point of Quadrangle regionValue: A right-bottom corner Point of Quadrangle region

setRightTop()

Sets right-top corner Point of Quadrangle regionValue: A right-top corner Point of Quadrangle region

toString()

Returns a human-readable string representation of this Quadrangle.

Returns: A string that represents this Quadrangle.