VASSAL.tools
Class RotateFilter
java.lang.Object
|
+--java.awt.image.ImageFilter
|
+--VASSAL.tools.RotateFilter
- All Implemented Interfaces:
- java.lang.Cloneable, java.awt.image.ImageConsumer
- public class RotateFilter
- extends java.awt.image.ImageFilter
| 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 |
|
Method Summary |
void |
imageComplete(int status)
Notification that the image is complete and there will
be no further setPixel calls. |
static void |
main(java.lang.String[] args)
|
void |
setColorModel(java.awt.image.ColorModel model)
Tell the consumer that we use the defaultRGBModel color model
NOTE: This overrides whatever color model is used underneath us. |
void |
setDimensions(int width,
int height)
Tell the consumer the new dimensions based on our
rotation of coordinate space. |
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scansize)
Set the pixels in our image array from the passed
array of bytes. |
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scansize)
Set the pixels in our image array from the passed
array of integers. |
void |
transformSpace(java.awt.Rectangle rect)
|
| Methods inherited from class java.awt.image.ImageFilter |
clone, getFilterInstance, resendTopDownLeftRight, setHints, setProperties |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RotateFilter
public RotateFilter(double angle)
transformSpace
public void transformSpace(java.awt.Rectangle rect)
setDimensions
public void setDimensions(int width,
int height)
- Tell the consumer the new dimensions based on our
rotation of coordinate space.
- Specified by:
setDimensions in interface java.awt.image.ImageConsumer- Overrides:
setDimensions in class java.awt.image.ImageFilter
- See Also:
ImageConsumer.setDimensions(int, int)
setColorModel
public void setColorModel(java.awt.image.ColorModel model)
- Tell the consumer that we use the defaultRGBModel color model
NOTE: This overrides whatever color model is used underneath us.
- Specified by:
setColorModel in interface java.awt.image.ImageConsumer- Overrides:
setColorModel in class java.awt.image.ImageFilter
- Parameters:
model - contains the color model of the image or filter
beneath us (preceding us)- See Also:
ImageConsumer.setColorModel(java.awt.image.ColorModel)
setPixels
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scansize)
- Set the pixels in our image array from the passed
array of bytes. Xlate the pixels into our default
color model (RGB).
- Specified by:
setPixels in interface java.awt.image.ImageConsumer- Overrides:
setPixels in class java.awt.image.ImageFilter
- See Also:
ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)
setPixels
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scansize)
- Set the pixels in our image array from the passed
array of integers. Xlate the pixels into our default
color model (RGB).
- Specified by:
setPixels in interface java.awt.image.ImageConsumer- Overrides:
setPixels in class java.awt.image.ImageFilter
- See Also:
ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)
imageComplete
public void imageComplete(int status)
- Notification that the image is complete and there will
be no further setPixel calls.
- Specified by:
imageComplete in interface java.awt.image.ImageConsumer- Overrides:
imageComplete in class java.awt.image.ImageFilter
- See Also:
ImageConsumer.imageComplete(int)
main
public static void main(java.lang.String[] args)