|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uci.ics.jung.visualization.graphics.Image
I - public abstract class Image
An abstract wrapper image class using generics to wrap a UI specific image. It is the responsibility of the particular rendering engine to know how to draw the underlying image.
| Field Summary | |
|---|---|
static int |
SCALE_DEFAULT
Use the default image-scaling algorithm. |
static int |
SCALE_FAST
Choose an image-scaling algorithm that gives higher priority to scaling speed than smoothness of the scaled image. |
static int |
SCALE_SMOOTH
Choose an image-scaling algorithm that gives higher priority to image smoothness than scaling speed. |
| Constructor Summary | |
|---|---|
Image()
|
|
| Method Summary | |
|---|---|
void |
draw(GraphicsContext graphicsContext,
int x,
int y)
|
abstract GraphicsContext |
getGraphicsContext()
|
abstract int |
getHeight()
|
abstract Image |
getScaledInstance(int width,
int height,
int hints)
Creates a scaled version of this image. |
abstract int |
getWidth()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SCALE_DEFAULT
public static final int SCALE_FAST
public static final int SCALE_SMOOTH
| Constructor Detail |
|---|
public Image()
| Method Detail |
|---|
public abstract int getWidth()
public abstract int getHeight()
public abstract GraphicsContext getGraphicsContext()
public abstract Image getScaledInstance(int width,
int height,
int hints)
Image object is returned which will render
the image at the specified width and
height by default. The new Image object
may be loaded asynchronously even if the original source image
has already been loaded completely.
If either width
or height is a negative number then a value is
substituted to maintain the aspect ratio of the original image
dimensions. If both width and height
are negative, then the original image dimensions are used.
width - the width to which to scale the image.height - the height to which to scale the image.hints - flags to indicate the type of algorithm to use
for image resampling.
IllegalArgumentException - if width
or height is zero.Image.SCALE_DEFAULT,
Image.SCALE_FAST,
Image.SCALE_SMOOTH,
Image.SCALE_REPLICATE,
Image.SCALE_AREA_AVERAGING
public void draw(GraphicsContext graphicsContext,
int x,
int y)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||