|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.image.ImageFilter
graph.RotateTextFilter
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
| Field Summary | |
private int |
angle
|
private byte[] |
bpixels
|
private java.awt.image.ColorModel |
colorModel
|
private double |
cos
|
private int |
height
|
private int[] |
ipixels
|
private double |
sin
|
private int |
width
|
private int |
xmax
|
private int |
xmin
|
private int |
ymax
|
private int |
ymin
|
| 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 |
| Constructor Summary | |
RotateTextFilter(int angle)
Instantiate the class |
|
| 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 |
| Methods inherited from class java.awt.image.ImageFilter |
clone, getFilterInstance, resendTopDownLeftRight, setColorModel, setHints |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int angle
private int xmin
private int xmax
private int ymin
private int ymax
private int width
private int height
private double cos
private double sin
private int[] ipixels
private byte[] bpixels
private java.awt.image.ColorModel colorModel
| Constructor Detail |
public RotateTextFilter(int angle)
angle - the angle to rotate the image. Only multiples of 90 degrees
are allowed| Method Detail |
public void setProperties(java.util.Hashtable props)
props - The property table of the original image
public void setDimensions(int w,
int h)
w - width of the original imageh - height of the original image
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scan)
x - position of Left column in original image of this rectangley - poisition of Top row in original image of this rectanglew - width of this rectangleh - height of this rectanglemodel - Colormodel associated with original imagepixels - Array containing the image or part of itoff - The offset into the pixels array where the parsed
rectangle startsscan - The actual width of the image.
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scan)
x - position of Left column in original image of this rectangley - poisition of Top row in original image of this rectanglew - width of this rectangleh - height of this rectanglemodel - Colormodel associated with original imagepixels - Array containing the image or part of itoff - The offset into the pixels array where the parsed
rectangle startsscan - The actual width of the image.public void imageComplete(int status)
status - Status of the original image from the image producer.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||