vooga.physicsEngine.geometry.shapes
Class ImageUtilities
java.lang.Object
vooga.physicsEngine.geometry.shapes.ImageUtilities
public class ImageUtilities
- extends java.lang.Object
Utility class for various image related functionalities for the physics
engine.
One functionality is createTextureFromShape and createImageFromShape, which
help to render different Shapes (internal physics engine geometry object)
onto the screen by creating a transparent image. This can create the
corresponding Texture
objects (see game engine) so that one can
do new PhysicalItem(new Circle(5)) and have a circle be displayed on the
screen, without needing to supply an image of a circle.
- Author:
- Peng Shi
Method Summary |
static java.awt.image.BufferedImage |
scaleImage(java.awt.image.BufferedImage image,
int newWidth,
int newHeight)
Return a scaled BufferedImage with the indicated new dimensions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageUtilities
public ImageUtilities()
scaleImage
public static java.awt.image.BufferedImage scaleImage(java.awt.image.BufferedImage image,
int newWidth,
int newHeight)
- Return a scaled BufferedImage with the indicated new dimensions
- Parameters:
image
- original imagenewWidth
- new widthnewHeight
- new height
- Returns:
- scaled BufferedImage