Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
java.awt.Image
gnu.awt.xlib.XOffScreenImage
public class XOffScreenImage
extends Image
implements IntegerGraphicsState.ScreenCoupledImage, ImageConsumer
Field Summary |
Fields inherited from class java.awt.Image | |
SCALE_AREA_AVERAGING , SCALE_DEFAULT , SCALE_FAST , SCALE_REPLICATE , SCALE_SMOOTH , UndefinedProperty , accelerationPriority |
Fields inherited from interface java.awt.image.ImageConsumer | |
COMPLETESCANLINES , IMAGEABORTED , IMAGEERROR , RANDOMPIXELORDER , SINGLEFRAME , SINGLEFRAMEDONE , SINGLEPASS , STATICIMAGEDONE , TOPDOWNLEFTRIGHT |
Method Summary | |
void |
|
Graphics |
|
GraphicsConfiguration |
|
int |
|
int |
|
Pixmap |
|
Object |
|
ImageProducer |
|
int |
|
int |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class java.awt.Image | |
flush , getAccelerationPriority , getGraphics , getHeight , getProperty , getScaledInstance , getSource , getWidth , setAccelerationPriority |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public void flush()
Flushes (that is, destroys) any resources used for this image. This includes the actual image data.
public Graphics getGraphics()
Returns a graphics context object for drawing an off-screen object. This method is only valid for off-screen objects.
- Overrides:
- getGraphics in interface Image
- Returns:
- a graphics context object for an off-screen object
- See Also:
Graphics.createImage(int, int)
public GraphicsConfiguration getGraphicsConfiguration()
Get the GraphicsConfiguration to which this image is coupled
- Specified by:
- getGraphicsConfiguration in interface IntegerGraphicsState.ScreenCoupledImage
- Returns:
- the GraphicsConfiguration
public int getHeight()
Returns the height of the image, or -1 if it is unknown. If the image height is unknown, the observer object will be notified when the value is known.
- Returns:
- the height in pixels
- See Also:
getWidth()
public int getHeight(ImageObserver observer)
Returns the height of the image, or -1 if it is unknown. If the image height is unknown, the observer object will be notified when the value is known.
- Parameters:
observer
- the image observer for this object
- Returns:
- the height in pixels
- See Also:
getWidth(ImageObserver)
public Object getProperty(String name, ImageObserver observer)
This method requests a named property for an object. The value of the property is returned. The valueUndefinedProperty
is returned if there is no property with the specified name. The valuenull
is returned if the properties for the object are not yet known. In this case, the specified image observer is notified when the properties are known.
- Overrides:
- getProperty in interface Image
- Parameters:
name
- the requested property nameobserver
- the image observer for this object
- Returns:
- the named property, if available
- See Also:
Image.UndefinedProperty
public ImageProducer getSource()
Returns the image producer object for this object. The producer is the object which generates pixels for this image.
- Returns:
- the image producer for this object
public int getWidth()
Returns the width of the image, or -1 if it is unknown. If the image width is unknown, the observer object will be notified when the value is known.
- Returns:
- the width in pixels
- See Also:
getHeight()
public int getWidth(ImageObserver observer)
Returns the width of the image, or -1 if it is unknown. If the image width is unknown, the observer object will be notified when the value is known.
- Parameters:
observer
- the image observer for this object
- Returns:
- the width in pixels
- See Also:
getHeight(ImageObserver)
public void imageComplete(int status)
TheImageProducer
calls this method to indicate a single frame or the entire image is complete. The method is also used to indicate an error in loading or producing the image.
- Specified by:
- imageComplete in interface ImageConsumer
- Parameters:
status
- the status of image production, represented by a bitwise OR of ImageConsumer flags
public void setColorModel(ColorModel model)
ThisColorModel
should indicate the model used by the majority of calls tosetPixels
. Each call tosetPixels
could however indicate a differentColorModel
.
- Specified by:
- setColorModel in interface ImageConsumer
- Parameters:
model
- the color model to be used most often by setPixels
- See Also:
ColorModel
public void setDimensions(int width, int height)
AnImageProducer
indicates the size of the image being produced using this method.
- Specified by:
- setDimensions in interface ImageConsumer
- Parameters:
width
- the width of the imageheight
- the height of the image
public void setHints(int flags)
TheImageProducer
should call this method with a bit mask of hints from any ofRANDOMPIXELORDER
,TOPDOWNLEFTRIGHT
,COMPLETESCANLINES
,SINGLEPASS
,SINGLEFRAME
.
- Specified by:
- setHints in interface ImageConsumer
- Parameters:
flags
- a bit mask of hints
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize)
Deliver a subset of an ImageProducer's pixels to this ImageConsumer. Each element of the pixels array represents one pixel. The pixel data is formatted according to the color model model. The x and y parameters are the coordinates of the block of pixels being delivered to this ImageConsumer. They are specified relative to the top left corner of the image being produced. Likewise, w and h are the pixel block's dimensions.
- Specified by:
- setPixels in interface ImageConsumer
- Parameters:
x
- x coordinate of pixel blocky
- y coordinate of pixel blockw
- width of pixel blockh
- height of pixel blockmodel
- color model used to interpret pixel datapixels
- pixel block dataoffset
- offset into pixels arrayscansize
- width of one row in the pixel block
public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int offset, int scansize)
Deliver a subset of an ImageProducer's pixels to this ImageConsumer. Each element of the pixels array represents one pixel. The pixel data is formatted according to the color model model. The x and y parameters are the coordinates of the rectangular region of pixels being delivered to this ImageConsumer, specified relative to the top left corner of the image being produced. Likewise, w and h are the pixel region's dimensions.
- Specified by:
- setPixels in interface ImageConsumer
- Parameters:
x
- x coordinate of pixel blocky
- y coordinate of pixel blockw
- width of pixel blockh
- height of pixel blockmodel
- color model used to interpret pixel datapixels
- pixel block dataoffset
- offset into pixels arrayscansize
- width of one row in the pixel block