Older Newer
Sat, 08 Dec 2007 14:29:47 . . . . afh [Move ForEveryPixel to its own page, flesh out descriptions.]


Changes by last author:

Added:
== Handlers ==

A handler is a special-purpose function which is invoked whenever a specified event or condition occurs. The parameters for a handler are passed implicitly via global variables. The value returned by a handler may vary, but is often a Boolean flag indicating whether or not the handler successfully completed its mission.

1> (OnInitDialog)?

:is an internal handler, not currently exposed to the Filter Designer. It is invoked when the plug-in is first loaded, and is responsible for initializing global variables, creating the initial filter dialog, and establishing the initial set of controls in the filter dialog.

2> OnCtl

:is invoked whenever a control is activated which might require some response, such as initiating the image filtration process. This handler is also a catch-all for various other events.

3> OnFilterStart

:is invoked whenever it is time to begin processing (or "filtering") the current image to produce the preview display or the final result image.

4> ForEveryTile

:is invoked once for every tile in the image during filter processing (if OnFilterStart returns false).

5> ForEveryRow

:is invoked once for every row in the current tile, if ForEveryTile returns false.

6> ForEveryPixel

:is invoked once for every pixel in the current row, if ForEveryRow returns false.

7> (R, G, B, A)?

:Each of these handlers (R, G, B, or A) is invoked once for each pixel, if ForEveryPixel returns false for the pixel in question. There may be multiple instances of each R, G, B, or A handler, in which case`they will be called in sequence for each designated pixel.

8> OnFilterEnd

:is called after the last pixel of the last row of the last tile in the current image has been processed, and is responible for performing any post-filtering clean-up actions.

9> (OnDivideCheck)?

:is an internal handler not exposed to the Filter Designer. It is invoked immediately before each integer division instruction in the filter code to guard against the possibility of generating an integer division fault.

10> (OnZeroDivide)?

:is invoked whenever an integer division (or remainder) operation is about to attempt to divide by 0. The default (OnZeroDivide)? handler forces the result of the operation to 0, for compatibility with (Filter Factory)?.

11> (OnDivideOverflow)?

:is invoked whenever an integer division (or remainder) operation is about to produce a divide overflow error. The default (OnDivideOverflow)? handler returns a result of 0x80000000 (indefinite-Nan) for the division or remainder operation.