com.sun.jimi.core.filters
Class ReplicatingScaleFilter
java.lang.Object
|
+--java.awt.image.ImageFilter
|
+--com.sun.jimi.core.filters.ReplicatingScaleFilter
- Direct Known Subclasses:
- AreaAverageScaleFilter, AspectReplicateScaleFilter, AspectScaler
- public class ReplicatingScaleFilter
- extends java.awt.image.ImageFilter
Fast scaling filter based on java.awt.image.ReplicateScaleFilter, but more
reliable.
Fields inherited from class java.awt.image.ImageFilter |
consumer |
Constructor Summary |
ReplicatingScaleFilter(int width,
int height)
Constructs a ReplicatingScaleFilter that scales the pixels from
its source Image as specified by the width and height parameters. |
Method Summary |
void |
setDimensions(int w,
int h)
Override the dimensions of the source image and pass the dimensions
of the new scaled size to the ImageConsumer. |
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scansize)
Choose which rows and columns of the delivered byte pixels are
needed for the destination scaled image and pass through just
those rows and columns that are needed, replicated as necessary. |
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scansize)
Choose which rows and columns of the delivered int pixels are
needed for the destination scaled image and pass through just
those rows and columns that are needed, replicated as necessary. |
void |
setProperties(java.util.Hashtable props)
Passes along the properties from the source object after adding a
property indicating the scale applied. |
Methods inherited from class java.awt.image.ImageFilter |
clone,
getFilterInstance,
imageComplete,
resendTopDownLeftRight,
setColorModel,
setHints |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
srcWidth
protected int srcWidth
srcHeight
protected int srcHeight
destWidth
protected int destWidth
destHeight
protected int destHeight
srcrows
protected int[] srcrows
srccols
protected int[] srccols
outpixbuf
protected java.lang.Object outpixbuf
ReplicatingScaleFilter
public ReplicatingScaleFilter(int width,
int height)
- Constructs a ReplicatingScaleFilter that scales the pixels from
its source Image as specified by the width and height parameters.
- Parameters:
width
- the target width to scale the imageheight
- the target height to scale the image
setProperties
public void setProperties(java.util.Hashtable props)
- Passes along the properties from the source object after adding a
property indicating the scale applied.
- Overrides:
- setProperties in class java.awt.image.ImageFilter
setDimensions
public void setDimensions(int w,
int h)
- Override the dimensions of the source image and pass the dimensions
of the new scaled size to the ImageConsumer.
- Overrides:
- setDimensions in class java.awt.image.ImageFilter
- See Also:
ImageConsumer
setPixels
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scansize)
- Choose which rows and columns of the delivered byte pixels are
needed for the destination scaled image and pass through just
those rows and columns that are needed, replicated as necessary.
- Overrides:
- setPixels in class java.awt.image.ImageFilter
setPixels
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scansize)
- Choose which rows and columns of the delivered int pixels are
needed for the destination scaled image and pass through just
those rows and columns that are needed, replicated as necessary.
- Overrides:
- setPixels in class java.awt.image.ImageFilter