Class: Costume

Costume

new Costume (canvas, name, rotationCenter)

Name Type Description
canvas HTMLCanvasElement
name String
rotationCenter Point optional

Methods

boundingBox ()Rectangle

Returns:
Type Description
Rectangle

bounds ()Rectangle

Returns:
Type Description
Rectangle

canvasBoundingBox (pic)Rectangle

Name Type Description
pic HTMLCanvasElement
Returns:
Type Description
Rectangle

center ()Point

Returns:
Type Description
Point

copy ()Costume

Returns:
Type Description
Costume

edit (aWorld, anIDE, isnew, oncancel, onsubmit)

Name Type Description
aWorld WorldMorph
anIDE IDE_Morph
isnew boolean optional
oncancel function optional
onsubmit function optional

editRotationPointOnly (aWorld)

Name Type Description
aWorld WorldMorph

extent ()Point

Returns:
Type Description
Point

flipped ()Costume

Returns:
Type Description
Costume

height ()number

Returns:
Type Description
number

isTainted ()boolean

Returns:
Type Description
boolean

maxExtent ()Point

Returns:
Type Description
Point

shrinkToFit (extentPoint)

Name Type Description
extentPoint Point

shrinkWrap ()

thumbnail (extentPoint)HTMLCanvasElement

Name Type Description
extentPoint Point
Returns:
Type Description
HTMLCanvasElement

toString ()String

Returns:
Type Description
String
Example
'a Costume(name)'

width ()number

Returns:
Type Description
number