graph
Class RotateTextFilter

java.lang.Object
java.awt.image.ImageFilter
graph.RotateTextFilter
- All Implemented Interfaces:
- java.lang.Cloneable, java.awt.image.ImageConsumer
- class RotateTextFilter
- extends java.awt.image.ImageFilter
This is an extension to the ImageFilter class that will rotate an image
a multiple of 90 degrees. This filter is easily extended to allow arbitrary
rotations
|
Method Summary |
void |
imageComplete(int status)
Called when the image is complete. |
void |
setDimensions(int w,
int h)
Find the dimensions of the original image and pass onto
the image consumer the dimensions of the new roated image |
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scan)
As the pixels of the original image are sent store them in memory
as the rotated image. |
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scan)
As the pixels of the original image are sent store them in memory
as the rotated image. |
void |
setProperties(java.util.Hashtable props)
Add to the properties table of the image that it has been rotated |
angle
private int angle
xmin
private int xmin
xmax
private int xmax
ymin
private int ymin
ymax
private int ymax
width
private int width
height
private int height
cos
private double cos
sin
private double sin
ipixels
private int[] ipixels
bpixels
private byte[] bpixels
colorModel
private java.awt.image.ColorModel colorModel
RotateTextFilter
public RotateTextFilter(int angle)
- Instantiate the class
setProperties
public void setProperties(java.util.Hashtable props)
- Add to the properties table of the image that it has been rotated
setDimensions
public void setDimensions(int w,
int h)
- Find the dimensions of the original image and pass onto
the image consumer the dimensions of the new roated image
setPixels
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scan)
- As the pixels of the original image are sent store them in memory
as the rotated image.
This method is called with a subset rectangle of the original image.
setPixels
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scan)
- As the pixels of the original image are sent store them in memory
as the rotated image.
This method is called with a subset rectangle of the original image.
imageComplete
public void imageComplete(int status)
- Called when the image is complete.
When this is called by the image producer, we can then pass the rotated
image onto the image consumer.