BaseShape

Kind of class:class
Inherits from:CoreObject
Implements:
Known subclasses:
Version:08/02/07
Author:Aaron Clinger
Classpath:org.casalib.math.geom.BaseShape
File last modified:Monday, 01 December 2008, 13:34:40
Base shape class. Class needs to be extended further to function properly.

Summary


Instance methods
Instance methods inherited from CoreObject

Instance methods

clone

function clone (

Returns:
  • A new shape object with the same values as this shape.
    #
Specified by:

containsPoint

function containsPoint (
pointObject:Point) : Boolean

Finds if point is contained inside the shape's perimeter.
#
Parameters:
pointObject:
A defined Point object.
#
Returns:
  • Returns {VISDOC_CODE_BLOCK_0} if shape's area contains point; otherwise {VISDOC_CODE_BLOCK_1}.
    #

destroy

function destroy (
) : Void

Removes any internal variables, intervals, enter frames, internal MovieClips and event observers to allow the object to be garbage collected.

Always call {VISDOC_CODE_BLOCK_0} before deleting last object pointer.
#

equals

function equals (
shape:ShapeInterface) : Boolean

getArea

function getArea (
) : Number

Returns:
  • The size of the shape.
    #
Specified by:

getCenterPoint

function getCenterPoint (
) : Point

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

function getPosition (
) : Point

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.
    #

getX

function getX (
) : Number

Returns:
  • The left X position.
    #
Specified by:

getY

function getY (
) : Number

Returns:
  • The top Y position.
    #
Specified by:

setHeight

function setHeight (
height:Number) : Void

Sets the height of the shape at its tallest point.
#
Parameters:
height:
Height of the shape.
#

setPosition

function setPosition (
pointObject:Point) : Void

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.
#

setX

function setX (
x:Number) : Void

Sets the X coordinate.
#
Parameters:
x:
The horizontal coordinate of the point.
#
Specified by:

setY

function setY (
y:Number) : Void

Sets the Y coordinate.
#
Parameters:
y:
The vertical coordinate of the point.
#
Specified by: