Package com.jogamp.nativewindow.util
Interface RectangleImmutable
- All Superinterfaces:
Comparable<RectangleImmutable>,com.jogamp.common.type.WriteCloneable
- All Known Implementing Classes:
Rectangle
public interface RectangleImmutable
extends com.jogamp.common.type.WriteCloneable, Comparable<RectangleImmutable>
Immutable Rectangle interface
-
Method Summary
Modifier and TypeMethodDescriptionintCompares square of size 1st, if equal the square of position.floatReturns the coverage of given rectangle w/ this this one, i.e.booleanChecks whether two rect objects are equal.intintgetWidth()intgetX()intgetY()inthashCode()intersection(int rx1, int ry1, int rx2, int ry2) Returns the intersection of this rectangleand the given coordinates.Returns the intersection of this rectangleand the given rectangle.union(int rx1, int ry1, int rx2, int ry2) Returns the union of this rectangleand the given coordinates.Returns the union of this rectangle and the given rectangle.Methods inherited from interface com.jogamp.common.type.WriteCloneable
cloneMutable
-
Method Details
-
getHeight
int getHeight() -
getWidth
int getWidth() -
getX
int getX() -
getY
int getY() -
union
Returns the union of this rectangle and the given rectangle. -
union
Returns the union of this rectangleand the given coordinates. -
intersection
Returns the intersection of this rectangleand the given rectangle. -
intersection
Returns the intersection of this rectangleand the given coordinates. -
coverage
Returns the coverage of given rectangle w/ this this one, i.e. between0.0and1.0.Coverage is computed by:
isect = this.intersection(r); coverage = area( isect ) / area( this ) ; -
compareTo
Compares square of size 1st, if equal the square of position.
- Specified by:
compareToin interfaceComparable<RectangleImmutable>
-
equals
Checks whether two rect objects are equal. Two instances ofRectangleare equal if the four integer values of the fieldsy,x,height, andwidthare all equal. -
hashCode
int hashCode()
-