public interface Parallelogram extends Shape
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(float x,
float y)
Returns if the specified coordinates are contained within this
Parallelogram |
boolean |
contains(Parallelogram parallelogram)
Returns if the specified
Parallelogram is contained within this
one |
float |
getHeight()
Returns the height of the shape
|
float |
getMaxX()
Returns the greatest x coordinate of this shape
|
float |
getMaxY()
Returns the greatest y coordinate of this shape
|
float |
getRotation()
Returns the current rotation of the shape in degrees
|
float |
getWidth()
Returns the width of the shape
|
boolean |
intersects(float x,
float y,
float width,
float height)
Returns if this shape intersects a specified rectangle dimensions
|
boolean |
intersects(LineSegment lineSegment)
Returns if this shape intersects a specified
LineSegment |
boolean |
intersects(Parallelogram parallelogram)
Returns if this shape intersects a specified
Parallelogram |
void |
rotate(float degrees)
Rotates the shape around its top-left corner by the specified degrees
adding to its existing rotation
|
void |
rotateAround(Point center,
float degrees)
Rotates the shape around a center point by the specified degrees adding
to its existing rotation
|
void |
setRotation(float degrees)
Sets the current rotation of the shape around its top-left corner
Note: Rotates around the top-left corner
|
void |
setRotationAround(Point center,
float degrees)
Sets the current rotation of the shape around a center point
|
draw, getNumberOfSidesaddPostionChangeListener, getDistanceTo, getX, getY, removePositionChangeListenerfloat getWidth()
float getHeight()
float getMaxX()
float getMaxY()
float getRotation()
void setRotation(float degrees)
degrees - The rotation angle in degreesvoid setRotationAround(Point center, float degrees)
center - The center point to rotate arounddegrees - The rotation angle in degreesvoid rotate(float degrees)
degrees - The rotation in degreesvoid rotateAround(Point center, float degrees)
degrees - The rotation in degreesboolean intersects(LineSegment lineSegment)
LineSegmentlineSegment - The LineSegment to test for intersectionboolean intersects(Parallelogram parallelogram)
Parallelogramparallelogram - The Parallelogram to test for intersectionboolean intersects(float x,
float y,
float width,
float height)
x - The x coordinate of the rectangley - The y coordinate of the rectanglewidth - The width of the rectangleheight - The height of the rectangleboolean contains(Parallelogram parallelogram)
Parallelogram is contained within this
oneparallelogram - The Parallelogram to testboolean contains(float x,
float y)
Parallelogramx - The x coordinatey - The y coordinate