java.awt
Class Image
java.lang.Object
|
+--java.awt.Image
public abstract class
Imageextends
Object This is the abstract superclass of all image objects in Java.
Since:Author:- Aaron M. Renn <arenn@urbanophile.com>
SCALE_AREA_AVERAGING
public static final int SCALE_AREA_AVERAGING
Constant indicating that the area averaging scaling algorithm should be
used.
Since:See Also:
SCALE_DEFAULT
public static final int SCALE_DEFAULT
Constant indicating that the default scaling algorithm should be used.
Since:
SCALE_FAST
public static final int SCALE_FAST
Constant indicating that a fast scaling algorithm should be used.
Since:
SCALE_REPLICATE
public static final int SCALE_REPLICATE
Constant indicating that the ReplicateScaleFilter
class
algorithm should be used for scaling.
Since:See Also:
SCALE_SMOOTH
public static final int SCALE_SMOOTH
Constant indicating that a smooth scaling algorithm should be used.
Since:
UndefinedProperty
public static final Object UndefinedProperty
This variable is returned whenever a property that is not defined
is requested.
Image
public Image()
A default constructor for subclasses.
flush
public void flush()
Flushes (that is, destroys) any resources used for this image. This
includes the actual image data.
getGraphics
public Graphics getGraphics()
Returns a graphics context object for drawing an off-screen object.
This method is only valid for off-screen objects.
Returns:
- a graphics context object for an off-screen object
See Also:
getHeight
public int getHeight(java.awt.image.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:
Returns:
See Also:
getProperty
public Object getProperty(java.lang.String name, java.awt.image.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.
Parameters:
Returns:
- the named property, if available
See Also:
getScaledInstance
public Image getScaledInstance(int width, int height, int flags)
Scales the image to the requested dimension. A new Image with asynchronous
loading will be produced according to the hints of the algorithm
requested. If either the width or height is non-positive, it is adjusted
to preserve the original aspect ratio.
Since:Parameters:
Returns:
See Also:
getSource
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
getWidth
public int getWidth(java.awt.image.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:
Returns:
See Also: