Class Index | File Index

Classes


Class pwlib.tools.pencil

The drawing pencil.
Defined in: pencil.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<private> <inner>  
Holds the points needed to be drawn.
<private> <inner>  
The interval ID used for running the pencil drawing operation every few milliseconds.
<private> <inner>  
x0
Holds the last point on the x axis of the image, for the current drawing operation.
<private> <inner>  
y0
Holds the last point on the y axis of the image, for the current drawing operation.
Method Summary
Method Attributes Method Name and Description
 
Tool deactivation event handler.
 
draw()
Draw the points in the stack.
 
keydown(ev)
Allows the user to press Escape to cancel the drawing operation.
 
Initialize the drawing operation.
 
Save the mouse coordinates in the array.
 
End the drawing operation, once the user releases the mouse button.
Class Detail
pwlib.tools.pencil(app)
Parameters:
{PaintWeb} app
Reference to the main paint application object.
Field Detail
<private> <inner> {Array} points
Holds the points needed to be drawn. Each point is added by the mousemove event handler.

<private> <inner> timer
The interval ID used for running the pencil drawing operation every few milliseconds.
See:
PaintWeb.config.toolDrawDelay

<private> <inner> {Number} x0
Holds the last point on the x axis of the image, for the current drawing operation.

<private> <inner> {Number} y0
Holds the last point on the y axis of the image, for the current drawing operation.
Method Detail
deactivate()
Tool deactivation event handler.

draw()
Draw the points in the stack. This function is called every few milliseconds.
See:
PaintWeb.config.toolDrawDelay

{Boolean} keydown(ev)
Allows the user to press Escape to cancel the drawing operation.
Parameters:
{Event} ev
The DOM Event object.
Returns:
{Boolean} True if the drawing operation was cancelled, or false if not.

mousedown()
Initialize the drawing operation.

mousemove()
Save the mouse coordinates in the array.

mouseup()
End the drawing operation, once the user releases the mouse button.

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