org.deken.game.animation.imageFx
Class ScaleImage
java.lang.Object
org.deken.game.animation.imageFx.ScaleImage
- All Implemented Interfaces:
- ImageEffect
public class ScaleImage
- extends java.lang.Object
- implements ImageEffect
Title: ScaleImage
Description: Scales the size of the image, from it's center. When the
height and width are set, the new size is recalculated, and it's offset for
the change in scale.
Copyright: Copyright (c) Sep 3, 2011
- Version:
- 1.0
- Author:
- Gary Deken
Constructor Summary |
ScaleImage(int xScale,
int yScale)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScaleImage
public ScaleImage(int xScale,
int yScale)
draw
public void draw(java.awt.Graphics2D graphics,
java.awt.Image image,
int x,
int y)
- Specified by:
draw
in interface ImageEffect
- Parameters:
graphics
- image
- x
- y
-
initialize
public void initialize(Animation animation)
- Specified by:
initialize
in interface ImageEffect
getHeight
public int getHeight()
getWidth
public int getWidth()
getxScale
public int getxScale()
getyScale
public int getyScale()
setHeight
public void setHeight(int height)
setWidth
public void setWidth(int width)
setxScale
public void setxScale(int xScale)
setyScale
public void setyScale(int yScale)