DESY ACOP Beans Home

com.cosylab.gui.components.util
Class DitherPaint

java.lang.Object
  extended by java.awt.TexturePaint
      extended by com.cosylab.gui.components.util.DitherPaint
All Implemented Interfaces:
java.awt.Paint, java.awt.Transparency

public class DitherPaint
extends java.awt.TexturePaint

A paint which renders a 1px dither pattern of the specified color. Density of the pattern is specified by the level constructor parameter. All pixels that are not colored, are transparent.

Author:
Miha Kadunc

Field Summary
static int DITHER_25
          25% dither
static int DITHER_50
          50% dither
static int DITHER_75
          75% dither
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
DitherPaint(java.awt.Color color, int ditherLevel)
          Creates a new paint with the specified color and density level
 
Method Summary
 
Methods inherited from class java.awt.TexturePaint
createContext, getAnchorRect, getImage, getTransparency
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DITHER_25

public static final int DITHER_25
25% dither

See Also:
Constant Field Values

DITHER_50

public static final int DITHER_50
50% dither

See Also:
Constant Field Values

DITHER_75

public static final int DITHER_75
75% dither

See Also:
Constant Field Values
Constructor Detail

DitherPaint

public DitherPaint(java.awt.Color color,
                   int ditherLevel)
Creates a new paint with the specified color and density level

Parameters:
color - The opaque pixels' color
ditherLevel - DITHER_25, DITHER_50 or DITHER_75


Copyright © 2010. All Rights Reserved.