ShapeInterface
Kind of class: | interface |
---|---|
Inherits from: | PointInterface < CoreInterface |
Implemented by: | |
Version: | 08/02/07 |
Author: | Aaron Clinger |
Classpath: | org.casalib.math.geom.ShapeInterface |
File last modified: | Monday, 01 December 2008, 13:34:40 |
Summary
Instance methods
- getWidth : Number
- setWidth (width:Number) : Void
- Sets the width of the shape at its widest point.
- getHeight : Number
- setHeight (height:Number) : Void
- Sets the height of the shape at its tallest point.
- getPosition : Point
- setPosition (pointObject:Point) : Void
- Sets the value of the top left X and Y position of the shape.
- getCenterPoint : Point
- getPerimeter : Number
- getArea : Number
- containsPoint (pointObject:Point) : Boolean
- Finds if point is contained inside the shape's perimeter.
- equals (shapeObject:ShapeInterface) : Boolean
- Determines whether the shape specified in the shapeObject parameter is equal to this shape object.
- clone : ShapeInterface
Instance methods inherited from PointInterface
Instance methods inherited from CoreInterface
Instance methods
clone
Returns:
- A new shape object with the same values as this shape.
containsPoint
Finds if point is contained inside the shape's perimeter.
Parameters:
pointObject:
A defined Point object.
Returns:
- Returns
true
if shape's area contains point; otherwisefalse
.
equals
Determines whether the shape specified in the
shapeObject
parameter is equal to this shape object. Parameters:
shapeObject:
A shape object.
Returns:
- Returns
true
if shape's location and size is identical; otherwisefalse
.
getArea
function getArea (
) : Number
Returns:
- The size of the shape.
getCenterPoint
Returns:
- A defined Point object with the value of the center position point of the shape.
getHeight
function getHeight (
) : Number
Returns:
- The height of the shape at its tallest point.
getPerimeter
function getPerimeter (
) : Number
Returns:
- The distance around the shape.
getPosition
Returns:
- A defined Point object with the value of the top left X and Y position of the shape.
getWidth
function getWidth (
) : Number
Returns:
- The width of the shape at its widest point.
setHeight
function setHeight (
height:Number) : Void
Sets the height of the shape at its tallest point.
Parameters:
height:
Height of the shape.
setPosition
Sets the value of the top left X and Y position of the shape.
Parameters:
pointObject:
A defined Point object.
setWidth
function setWidth (
width:Number) : Void
Sets the width of the shape at its widest point.
Parameters:
width:
Width of the shape.