gnu.awt.xlib
Class XOffScreenImage
- ImageConsumer, IntegerGraphicsState.ScreenCoupledImage
Image class for xlib off-screen buffers.
The image is stored in a server-side pixmap for best performance.
This class supports getGraphics, so you can draw on the pixmap, and is
specially handled when doing drawImage, so that the image copy is done
entirely in the X server.
This class does not support rasterization, for which you'd need an XImage.
void | flush() - Flushes (that is, destroys) any resources used for this image.
|
Graphics | getGraphics() - Returns a graphics context object for drawing an off-screen object.
|
GraphicsConfiguration | getGraphicsConfiguration() - Get the GraphicsConfiguration to which this image is coupled
|
int | getHeight() - Returns the height of the image, or -1 if it is unknown.
|
int | getHeight(ImageObserver observer) - Returns the height of the image, or -1 if it is unknown.
|
Pixmap | getPixmap() - Get the pixmap which contains this image
|
Object | getProperty(String name, ImageObserver observer) - This method requests a named property for an object.
|
ImageProducer | getSource() - Returns the image producer object for this object.
|
int | getWidth() - Returns the width of the image, or -1 if it is unknown.
|
int | getWidth(ImageObserver observer) - Returns the width of the image, or -1 if it is unknown.
|
void | imageComplete(int status) - The
ImageProducer calls this method to indicate a
single frame or the entire image is complete.
|
void | setColorModel(ColorModel model) - This
ColorModel should indicate the model used by
the majority of calls to setPixels .
|
void | setDimensions(int width, int height) - An
ImageProducer indicates the size of the image
being produced using this method.
|
void | setHints(int flags) - The
ImageProducer should call this method with a
bit mask of hints from any of RANDOMPIXELORDER ,
TOPDOWNLEFTRIGHT , COMPLETESCANLINES ,
SINGLEPASS , SINGLEFRAME .
|
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.
|
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.
|
void | setProperties(Hashtable<K,V> props)
|
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
flush
public void flush()
Flushes (that is, destroys) any resources used for this image. This
includes the actual image data.
- flush in interface Image
getGraphics
public Graphics getGraphics()
Returns a graphics context object for drawing an off-screen object.
This method is only valid for off-screen objects.
- getGraphics in interface Image
- a graphics context object for an off-screen object
Graphics.createImage(int, int)
getHeight
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.
getHeight
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.
- getHeight in interface Image
observer
- the image observer for this object
getProperty
public Object getProperty(String name,
ImageObserver observer)
This method requests a named property for an object. The value of the
property is returned. The value UndefinedProperty
is
returned if there is no property with the specified name. The value
null
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.
- getProperty in interface Image
name
- the requested property nameobserver
- the image observer for this object
- the named property, if available
getSource
public ImageProducer getSource()
Returns the image producer object for this object. The producer is the
object which generates pixels for this image.
- getSource in interface Image
- the image producer for this object
getWidth
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.
getWidth
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.
- getWidth in interface Image
observer
- the image observer for this object
imageComplete
public void imageComplete(int status)
The ImageProducer
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.
- imageComplete in interface ImageConsumer
status
- the status of image production, represented by a
bitwise OR of ImageConsumer flags
setColorModel
public void setColorModel(ColorModel model)
This ColorModel
should indicate the model used by
the majority of calls to setPixels
. Each call to
setPixels
could however indicate a different
ColorModel
.
- setColorModel in interface ImageConsumer
model
- the color model to be used most often by setPixels
setDimensions
public void setDimensions(int width,
int height)
An ImageProducer
indicates the size of the image
being produced using this method.
- setDimensions in interface ImageConsumer
width
- the width of the imageheight
- the height of the image
setHints
public void setHints(int flags)
The ImageProducer
should call this method with a
bit mask of hints from any of RANDOMPIXELORDER
,
TOPDOWNLEFTRIGHT
, COMPLETESCANLINES
,
SINGLEPASS
, SINGLEFRAME
.
- setHints in interface ImageConsumer
flags
- a bit mask of hints
setPixels
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.
- setPixels in interface ImageConsumer
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
setPixels
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.
- setPixels in interface ImageConsumer
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
Copyright (C) 2000, 2003 Free Software Foundation
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details.