Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

BrushFilter Class Reference

Inherits Brush.

List of all members.

Detailed Description

Apply a convolution filter to an input brush.

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.

Member Function Documentation

void int  x,
int  y

Set the center of the filter matrix.

For example, (1, 1) on a 3x3 filter makes the (1, 1) coordinate the input point.

void BrushFilter.divisor float  value  ) 

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.

void BrushFilter.resize int  value  ) 

Resize the square matrix.

This clears all cells to zero.

The documentation for this class was generated from the following file:
Generated on Thu Sep 4 13:12:51 2003 for dig by doxygen 1.3.2