java.lang.Object
java.awt.Image
java.awt.image.VolatileImage
gnu.java.awt.peer.gtk.GtkVolatileImage
- All Implemented Interfaces:
- java.awt.Transparency
- public class GtkVolatileImage
- extends java.awt.image.VolatileImage
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
width
private int width
height
private int height
caps
private java.awt.ImageCapabilities caps
GtkVolatileImage
public GtkVolatileImage(int width,
int height)
GtkVolatileImage
public GtkVolatileImage(int width,
int height,
java.awt.ImageCapabilities caps)
getSnapshot
public java.awt.image.BufferedImage getSnapshot()
- Description copied from class:
java.awt.image.VolatileImage
- Returns an image representing the current state of the volatile
image buffer. The returned image is static meaning that it is
not updated after being created. It is a snapshot of the
volatile image buffer at the time getSnapshot is called.
This method, which reads pixels from the volatile image buffer,
may be less-performant than methods that write pixels since
VolatileImages are typically optimized for writing.
getWidth
public int getWidth()
- Description copied from class:
java.awt.image.VolatileImage
- Returns the width of this image buffer.
getHeight
public int getHeight()
- Description copied from class:
java.awt.image.VolatileImage
- Returns the height of this image buffer.
createGraphics
public java.awt.Graphics2D createGraphics()
- Description copied from class:
java.awt.image.VolatileImage
- Returns a Graphics2D object that can be used to draw onto this
image.
validate
public int validate(java.awt.GraphicsConfiguration gc)
- Description copied from class:
java.awt.image.VolatileImage
- Validates and restores this image. If the image buffer has
become unavailable for further use since the last call to
validate, validate will allocate a new image buffer. The image
is also "validated" against the GraphicsConfiguration parameter.
"Validating" the image means checking that the capabilities it
requires of the output device are indeed supported by the given
output device. If the image's characteristics, which can be
highly output device-specific, are not supported by the graphics
configuration, then IMAGE_INCOMPATIBLE will be returned. This
can happen, for example, if this image was created on one output
device, then validated against a different output device with
different capabilities. Calling validate with a NULL gc argument
causes validate to skip the validation test.
contentsLost
public boolean contentsLost()
- Description copied from class:
java.awt.image.VolatileImage
- Returns true if the contents of the image buffer have been
damaged or if the image buffer's resources have been reclaimed by
the graphics system. You should call this method after a series
of rendering operations to or from the image, to see if the image
buffer needs to be revalidated or the image re-rendered.
getCapabilities
public java.awt.ImageCapabilities getCapabilities()
- Description copied from class:
java.awt.image.VolatileImage
- Returns the capabilities of this image buffer.
getProperty
public java.lang.Object getProperty(java.lang.String name,
java.awt.image.ImageObserver observer)
- Description copied from class:
java.awt.Image
- 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.
getWidth
public int getWidth(java.awt.image.ImageObserver observer)
- Description copied from class:
java.awt.Image
- 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.
getHeight
public int getHeight(java.awt.image.ImageObserver observer)
- Description copied from class:
java.awt.Image
- 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.