vooga.physicsEngine.geometry.shapes
Class ImageUtilities

java.lang.Object
  extended by 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

Constructor Summary
ImageUtilities()
           
 
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
 

Constructor Detail

ImageUtilities

public ImageUtilities()
Method Detail

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 image
newWidth - new width
newHeight - new height
Returns:
scaled BufferedImage