The filter is a matrix that is applied to a set of samples from the input, with each sample multiplied by an amount, and all the samples added together. Then the result is divided by an amount and that color is returned.
Public Member Functions | |
| void | input (Brush value) |
| Set the input brush. | |
| void | divisor (float value) |
| Set the divisor. | |
| float | findDivisor () |
| Get the set divisor or compute it. | |
| void | resize (int value) |
| Resize the square matrix. | |
| void | center (int x, int y) |
| Set the center of the filter matrix. | |
| void | set (int x, int y, float v) |
| Set a cell on the filter. | |
| void | setLineEdge () |
| Set to a line edge filter. | |
| void | setHighPass (float scale) |
| Set to a high pass filter. | |
| Color | eval (float x, float y) |
| Evaluate the filter. | |
|
||||||||||||
|
Set the center of the filter matrix. For example, (1, 1) on a 3x3 filter makes the (1, 1) coordinate the input point. |
|
|
Set the divisor. When the divisor is not set, it is set according to the sum of the cells in the matrix. You can restore this property by setting the divisor to float.nan. |
|
|
Resize the square matrix. This clears all cells to zero. |
1.3.2