Class Index | File Index

Classes


Class pwlib.tools.bcurve

The Bézier curve tool.
Defined in: bcurve.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<private> <inner>  
Tells if the drawing canvas needs to be updated or not.
<private> <inner>  
Holds the points in the Bézier curve being drawn.
<private> <inner>  
Tells if the Shift key is down or not.
<private> <inner>  
The interval ID used for invoking the drawing operation every few milliseconds.
Method Summary
Method Attributes Method Name and Description
 
The tool deactivation method, used for clearing the buffer.
 
draw()
Draw the Bézier curve, using the available points.
 
keydown(ev)
The keydown event handler.
 
The mousedown event handler.
 
Store the Shift key state which is used by the drawing function.
 
mouseup(ev)
The mouseup event handler.
Class Detail
pwlib.tools.bcurve(app)
Parameters:
{PaintWeb} app
Reference to the main paint application object.
Field Detail
<private> <inner> {Boolean} needsRedraw
Tells if the drawing canvas needs to be updated or not.
Default Value:
false

<private> <inner> {Array} points
Holds the points in the Bézier curve being drawn.

<private> <inner> {Boolean} shiftKey
Tells if the Shift key is down or not. This is used by the drawing function.
Default Value:
false

<private> <inner> timer
The interval ID used for invoking the drawing operation every few milliseconds.
See:
PaintWeb.config.toolDrawDelay
Method Detail
deactivate()
The tool deactivation method, used for clearing the buffer.

draw()
Draw the Bézier curve, using the available points.
See:
PaintWeb.config.toolDrawDelay

{Boolean} keydown(ev)
The keydown event handler. This method allows the user to press the Escape key to cancel the current drawing operation.
Parameters:
{Event} ev
The DOM Event object.
Returns:
{Boolean} True if the keyboard shortcut was recognized, or false if not.

mousedown(ev)
The mousedown event handler.
Parameters:
{Event} ev
The DOM Event object.

mousemove(ev)
Store the Shift key state which is used by the drawing function.
Parameters:
{Event} ev
The DOM Event object.

mouseup(ev)
The mouseup event handler. This method stores the current mouse coordinates as a point to be used for drawing the Bézier curve.
Parameters:
{Event} ev
The DOM Event object.

Documentation generated by JsDoc Toolkit 2.3.0 on Sat Jun 26 2010 21:57:02 GMT+0300 (EEST)