com.croftsoft.core.animation.painter
Class ScalePainter
java.lang.Object
com.croftsoft.core.animation.painter.ScalePainter
- All Implemented Interfaces:
- ComponentPainter
public final class ScalePainter
- extends Object
- implements ComponentPainter
Scales the image to fit the entire Component.
This class differs from StretchPainter in that it scales both width
and height by the same factor to prevent distortion.
You can override the default scaling by calling setScale().
- Since:
- 2006-04-23
- Version:
- $Date: 2007/02/25 03:30:11 $
- See Also:
StretchPainter
- Author:
- David Wallace Croft
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScalePainter
public ScalePainter(Image image)
ScalePainter
public ScalePainter()
getImage
public Image getImage()
setImage
public void setImage(Image image)
setScale
public void setScale(double scale)
paint
public void paint(JComponent component,
Graphics2D graphics)
- Specified by:
paint
in interface ComponentPainter
CroftSoft Core Javadoc (2008-09-28 20:58:02)