JMSLTM Numerical Library 5.0.1

com.imsl.chart
Class WebSafeImageFilter

java.lang.Object
  extended by java.awt.image.ImageFilter
      extended by com.imsl.chart.WebSafeImageFilter
All Implemented Interfaces:
ImageConsumer, Cloneable

public class WebSafeImageFilter
extends ImageFilter

Maps colors in an image to the nearest Web-safe color.


Field Summary
 
Fields inherited from class java.awt.image.ImageFilter
consumer
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
WebSafeImageFilter()
           
 
Method Summary
static Color getSafePixel(Color color)
          Returns the Web-safe color nearest the given color.
 void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
           
 void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
           
 
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setColorModel, setDimensions, setHints, setProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSafeImageFilter

public WebSafeImageFilter()
Method Detail

getSafePixel

public static Color getSafePixel(Color color)
Returns the Web-safe color nearest the given color.


setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
Specified by:
setPixels in interface ImageConsumer
Overrides:
setPixels in class ImageFilter

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
Specified by:
setPixels in interface ImageConsumer
Overrides:
setPixels in class ImageFilter

JMSLTM Numerical Library 5.0.1

Copyright © 1970-2008 Visual Numerics, Inc.
Built July 8 2008.