Class Index | File Index

Classes


Class CanvasProps


Defined in: canvasprops.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
CanvasProps(width, height)
A wrapper for canvas element.
Field Summary
Field Attributes Field Name and Description
<static>  
CanvasProps.DEFAULT_HEIGHT
default height for canvas
<static>  
CanvasProps.DEFAULT_WIDTH
default width for canvas
 
Canvas height
 
id
Canvas id.
 
Serialization type
 
Canvas width
Method Summary
Method Attributes Method Name and Description
 
Return the height of the canvas
 
Get width of the canvas
<static>  
CanvasProps.load(o)
We only ever have one instance of this class (like stack) but we need the creation of the Canvas to appear AFTER the page exists, otherwise we would not be able to add it dinamically to the document.
 
setHeight(height)
Set the height of the canvas.
 
setWidth(width)
Set the width of the canvas.
 
sync()
Resize the Canvas to current values
 
Returns a representation of the object
Class Detail
CanvasProps(width, height)
A wrapper for canvas element. This should only used to save / store canvas' properties
Author: Zack Newsham , Alex Gheorghiu .
Parameters:
{Number} width
- the width of the {Canvas}
{Number} height
- the height of the {Canvas}
Field Detail
<static> CanvasProps.DEFAULT_HEIGHT
default height for canvas

<static> CanvasProps.DEFAULT_WIDTH
default width for canvas

height
Canvas height

id
Canvas id. Used in main.js:updateFigure() to see what object we have

oType
Serialization type

width
Canvas width
Method Detail
getHeight()
Return the height of the canvas

getWidth()
Get width of the canvas

<static> CanvasProps.load(o)
We only ever have one instance of this class (like stack) but we need the creation of the Canvas to appear AFTER the page exists, otherwise we would not be able to add it dinamically to the document.
Author: Zack Newsham , Alex Gheorghiu .
Parameters:
{JSONObject} o
Returns:
new {Canvas}

setHeight(height)
Set the height of the canvas. Also force a Canvas resize
Parameters:
{Numeric} height
- the new height

setWidth(width)
Set the width of the canvas. Also force a canvas resize
Parameters:
{Numeric} width
- the new width

sync()
Resize the Canvas to current values
Author: alex@scriptoid.com.

{String} toString()
Returns a representation of the object
Returns:
{String}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 09 2011 12:47:25 GMT+0300 (EEST)