edu.uci.ics.jung.visualization.swt.graphics
Class SWTImageImpl
java.lang.Object
edu.uci.ics.jung.visualization.graphics.Image
edu.uci.ics.jung.visualization.swt.graphics.SWTImageImpl
- All Implemented Interfaces:
- ShapeProducer
public class SWTImageImpl
- extends Image
- implements ShapeProducer
|
Constructor Summary |
SWTImageImpl(org.eclipse.swt.graphics.Device dev,
int width,
int height)
|
SWTImageImpl(org.eclipse.swt.graphics.Image image)
|
| Methods inherited from class edu.uci.ics.jung.visualization.graphics.Image |
draw |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SWTImageImpl
public SWTImageImpl(org.eclipse.swt.graphics.Device dev,
int width,
int height)
SWTImageImpl
public SWTImageImpl(org.eclipse.swt.graphics.Image image)
getSWTImage
public org.eclipse.swt.graphics.Image getSWTImage()
getGraphicsContext
public GraphicsContext getGraphicsContext()
- Specified by:
getGraphicsContext in class Image
getWidth
public int getWidth()
- Specified by:
getWidth in class Image
getHeight
public int getHeight()
- Specified by:
getHeight in class Image
getScaledInstance
public Image getScaledInstance(int width,
int height,
int hints)
- Description copied from class:
Image
- Creates a scaled version of this image.
A new
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.
- Specified by:
getScaledInstance in class Image
- Parameters:
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.
- Returns:
- a scaled version of the image.
- See Also:
Image.SCALE_DEFAULT,
Image.SCALE_FAST,
Image.SCALE_SMOOTH,
Image.SCALE_REPLICATE,
Image.SCALE_AREA_AVERAGING
getShape
public Shape getShape()
- Specified by:
getShape in interface ShapeProducer
Copyright © 2007. All Rights Reserved.