net.aerith.misao.image.filter
Class ResizeFilter

java.lang.Object
  |
  +--net.aerith.misao.image.filter.Filter
        |
        +--net.aerith.misao.image.filter.ResizeFilter

public class ResizeFilter
extends Filter

The ResizeFilter is an image processing filter to resize the image to the specified size. It copies the part of the buffer based on the specified base position and the new size, creates the new image buffer, and pastes on the new buffer. If the size is not specified, the new image is the same as the original size. The result is stored in the new image.


Field Summary
protected  int base_x
          The base x position.
protected  int base_y
          The base y position.
protected  Size size
          The new size to rescale.
 
Fields inherited from class net.aerith.misao.image.filter.Filter
monitor_set
 
Constructor Summary
ResizeFilter()
          Constructs a filter.
ResizeFilter(Size new_size)
          Constructs a filter with new size.
 
Method Summary
 MonoImage operate(MonoImage image)
          Operates the image processing filter and creates the new image buffer.
 void setBasePosition(int x, int y)
          Sets the base position.
 void setSize(Size new_size)
          Sets the new size to rescale.
 
Methods inherited from class net.aerith.misao.image.filter.Filter
addMonitor, setMonitor
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

size

protected Size size
The new size to rescale.

base_x

protected int base_x
The base x position.

base_y

protected int base_y
The base y position.
Constructor Detail

ResizeFilter

public ResizeFilter()
Constructs a filter.

ResizeFilter

public ResizeFilter(Size new_size)
Constructs a filter with new size.
Parameters:
new_size - the new size to rescale.
Method Detail

setSize

public void setSize(Size new_size)
Sets the new size to rescale.
Parameters:
new_size - the new size to rescale.

setBasePosition

public void setBasePosition(int x,
                            int y)
Sets the base position.
Parameters:
x - the base x position.
y - the base y position.

operate

public MonoImage operate(MonoImage image)
Operates the image processing filter and creates the new image buffer.
Overrides:
operate in class Filter
Parameters:
image - the original image to process.
Returns:
the new image buffer.