Class Index | File Index

Classes


Class pwlib.tools.cbucket

The color bucket tool. The implementation here is based on the seed fill algorithm of Paul S. Heckbert (1990).
Defined in: cbucket.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
The click and contextmenu event handler.
Method Summary
Method Attributes Method Name and Description
 
The activate event handler.
 
 
The deactivate event handler.
<private> <inner>  
fill(x, y)
Fill the image with the current fill color, starting from the x and y coordinates.
<inner>  
pixelRead(x, y)
 
The preActivate event handler.
<inner>  
pushLine(y, xl, xr, dy)
Class Detail
pwlib.tools.cbucket(app)
Parameters:
{PaintWeb} app
Reference to the main paint application object.
Field Detail
click
The click and contextmenu event handler. This method performs the flood fill operation.
Method Detail
activate()
The activate event handler. Canvas shadow rendering is disabled.

contextmenu(ev)
Parameters:
ev

deactivate()
The deactivate event handler. Canvas shadow rendering is allowed once again.

<private> <inner> {Boolean} fill(x, y)
Fill the image with the current fill color, starting from the x and y coordinates.
Parameters:
{Number} x
The x coordinate for the starting point.
{Number} y
The y coordinate for the starting point.
Returns:
{Boolean} True if the image was filled, or false otherwise.

<inner> pixelRead(x, y)
Parameters:
x
y

preActivate()
The preActivate event handler. This method checks if the browser implements the getImageData() and putImageData() context methods. If not, the color bucket tool cannot be used.

<inner> pushLine(y, xl, xr, dy)
Parameters:
y
xl
xr
dy

Documentation generated by JsDoc Toolkit 2.3.0 on Sun Nov 08 2009 21:01:11 GMT+0200 (EET)