## helma.image
Class DiffusionFilterOp

    java.lang.Object
      helma.image.DiffusionFilterOp

All Implemented Interfaces:
  java.awt.image.BufferedImageOp

    public class DiffusionFilterOp

extends java.lang.Object
implements java.awt.image.BufferedImageOp

Field Summary
`protected static int[]` `diffusionMatrix`

Constructor Summary
`DiffusionFilterOp()` Construct a DiffusionFilter

Method Summary
`java.awt.image.BufferedImage` `createCompatibleDestImage(java.awt.image.BufferedImage src, java.awt.image.ColorModel destCM)`
`java.awt.image.BufferedImage` `filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)` Do the filter operation
`java.awt.geom.Rectangle2D` `getBounds2D(java.awt.image.BufferedImage src)`
`int[]` `getMatrix()`
`java.awt.geom.Point2D` `getPoint2D(java.awt.geom.Point2D srcPt, java.awt.geom.Point2D dstPt)`
`java.awt.RenderingHints` `getRenderingHints()`
`boolean` `getSerpentine()` Return the serpentine setting
`void` `setMatrix(int[] matrix)`
`void` `setSerpentine(boolean serpentine)` Set whether to use a serpentine pattern for return or not.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### diffusionMatrix

    protected static final int[] diffusionMatrix

Constructor Detail

### DiffusionFilterOp

    public DiffusionFilterOp()

  Construct a DiffusionFilter

Method Detail

### setSerpentine

    public void setSerpentine(boolean serpentine)

  Set whether to use a serpentine pattern for return or not. This can reduce 'avalanche' artifacts in the output.

  Parameters:
    `serpentine` - true to use serpentine pattern

### getSerpentine

    public boolean getSerpentine()

  Return the serpentine setting

  Returns:
    the current setting

### setMatrix

    public void setMatrix(int[] matrix)

### getMatrix

    public int[] getMatrix()

### filter

    public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
                                               java.awt.image.BufferedImage dst)

  Do the filter operation

  Specified by:
    `filter` in interface `java.awt.image.BufferedImageOp`
  Parameters:
    `src` - The source BufferedImage. Can be any type.
    `dst` - The destination image. If not null, must be of type TYPE_BYTE_INDEXED
  Returns:
    A dithered version of src in a BufferedImage of type TYPE_BYTE_INDEXED

### createCompatibleDestImage

    public java.awt.image.BufferedImage createCompatibleDestImage(java.awt.image.BufferedImage src,
                                                                  java.awt.image.ColorModel destCM)

  Specified by:
    `createCompatibleDestImage` in interface `java.awt.image.BufferedImageOp`

### getRenderingHints

    public java.awt.RenderingHints getRenderingHints()

  Specified by:
    `getRenderingHints` in interface `java.awt.image.BufferedImageOp`

### getPoint2D

    public java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D srcPt,
                                            java.awt.geom.Point2D dstPt)

  Specified by:
    `getPoint2D` in interface `java.awt.image.BufferedImageOp`

### getBounds2D

    public java.awt.geom.Rectangle2D getBounds2D(java.awt.image.BufferedImage src)

  Specified by:
    `getBounds2D` in interface `java.awt.image.BufferedImageOp`

Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.