Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.image

Class ReplicateScaleFilter

java.lang.Object
|
+--java.awt.image.ImageFilter
   |
   +--java.awt.image.ReplicateScaleFilter


public class ReplicateScaleFilter

extends ImageFilter

This filter should be used for fast scaling of images where the result does not need to ensure straight lines are still straight, etc. The exact method is not defined by Sun but some sort of fast Box filter should probably be correct.
Currently this filter does nothing and needs to be implemented.

Author:

Field Summary

intdestHeight

The height of the destination image.
intdestWidth

The width of the destination image.
java.lang.Objectoutpixbuf

intsrcHeight

The height of the source image.
intsrcWidth

The width of the source image.
int[]srccols

int[]srcrows

Constructor Summary

ReplicateScaleFilter(int width, int height)

This filter should be used for fast scaling of images where the result does not need to ensure straight lines are still straight, etc.

Method Summary

voidsetDimensions(int width, int height)

An ImageProducer indicates the size of the image being produced using this method.
voidsetPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int offset, int scansize)

This function delivers a rectangle of pixels where any pixel(m,n) is stored in the array as a byte at index (n * scansize + m + offset).
voidsetPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int offset, int scansize)

This function delivers a rectangle of pixels where any pixel(m,n) is stored in the array as an int at index (n * scansize + m + offset).
voidsetProperties(java.util.Hashtable props)

An ImageProducer can set a list of properties associated with this image by using this method.

Field Details

destHeight

protected int destHeight

The height of the destination image.


destWidth

protected int destWidth

The width of the destination image.


outpixbuf

protected Object outpixbuf


srcHeight

protected int srcHeight

The height of the source image.


srcWidth

protected int srcWidth

The width of the source image.


srccols

protected int[] srccols


srcrows

protected int[] srcrows


Constructor Details

ReplicateScaleFilter

public ReplicateScaleFilter(int width, int height)

This filter should be used for fast scaling of images where the result does not need to ensure straight lines are still straight, etc. The exact method is not defined by Sun but some sort of fast Box filter should probably be correct.
Currently this filter does nothing and needs to be implemented.

Author:Parameters:


Method Details

setDimensions

public void setDimensions(int width, int height)

An ImageProducer indicates the size of the image being produced using this method. A filter can override this method to intercept these calls from the producer in order to change either the width or the height before in turn calling the consumer's setDimensions method.

Parameters:


setPixels

public void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int offset, int scansize)

This function delivers a rectangle of pixels where any pixel(m,n) is stored in the array as a byte at index (n * scansize + m + offset).

Parameters:


setPixels

public void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int offset, int scansize)

This function delivers a rectangle of pixels where any pixel(m,n) is stored in the array as an int at index (n * scansize + m + offset).

Parameters:


setProperties

public void setProperties(java.util.Hashtable props)

An ImageProducer can set a list of properties associated with this image by using this method.

Parameters: