|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.filter.ConvolutionFilter.Builder
public static final class ConvolutionFilter.Builder
Builder for creating ConvolutionFilter objects.
Constructor Summary | |
---|---|
ConvolutionFilter.Builder()
|
Method Summary | |
---|---|
ConvolutionFilter |
build()
Generate an instance of ConvolutionFilter using the parameters set in the Builder. |
ConvolutionFilter.Builder |
setAlpha(boolean preserve)
Indicate whether the alpha value of the pixels should be preserved. |
ConvolutionFilter.Builder |
setBias(float value)
Set the bias for the convolution. |
ConvolutionFilter.Builder |
setClamp(boolean nearest)
Indicate whether the pixels outside the image will be clamped to the nearest pixel value (true) or to the default colour (false). |
ConvolutionFilter.Builder |
setColor(Color aColor)
Set the default colour applied to the pixels outside of the image. |
ConvolutionFilter.Builder |
setDivisor(float value)
Set the divisor for the convolution. |
ConvolutionFilter.Builder |
setMatrix(float[][] aMatrix)
Set the matrix used for the convolution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConvolutionFilter.Builder()
Method Detail |
---|
public ConvolutionFilter.Builder setMatrix(float[][] aMatrix)
aMatrix
- a 2D matrix.
public ConvolutionFilter.Builder setDivisor(float value)
value
- the divisor
public ConvolutionFilter.Builder setBias(float value)
value
- the bias
public ConvolutionFilter.Builder setColor(Color aColor)
aColor
- the default colour.
public ConvolutionFilter.Builder setClamp(boolean nearest)
nearest
- if true clamp to the nearest pixel, false use the
default colour.
public ConvolutionFilter.Builder setAlpha(boolean preserve)
preserve
- if true preserve the alpha values.
public ConvolutionFilter build()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |