sofia.micro.greenfoot
Class GreenfootImage

java.lang.Object
  extended by sofia.graphics.Image
      extended by sofia.micro.greenfoot.GreenfootImage

public class GreenfootImage
extends Image

A small "adaptor" class that allows client code to use the class name GreenfootImage instead of just Image. It is intended to provide for source-level compatibility of some Greenfoot examples.

Version:
$Date: 2012/08/06 11:13 $
Author:
Stephen Edwards, Last changed by $Author: edwards $

Constructor Summary
GreenfootImage(android.graphics.Bitmap bitmap)
          Create an image from a bitmap.
GreenfootImage(java.lang.Class<?> klass)
          Create an image from a class.
GreenfootImage(Image other)
          Create an image that is a duplicate of another image (a copy constructor).
GreenfootImage(java.lang.String fileName)
          Create an image from a file.
 
Method Summary
 
Methods inherited from class sofia.graphics.Image
asBitmap, getDefault, getHeight, getPixel, getPixels, getScaleForDpi, getWidth, resolveAgainstContext, setPixel, setPixels, setScaleForDpi, setUseDefaultIfNotFound, useDefaultIfNotFound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GreenfootImage

public GreenfootImage(android.graphics.Bitmap bitmap)
Create an image from a bitmap.

Parameters:
bitmap - The bitmap forming this image's contents.

GreenfootImage

public GreenfootImage(java.lang.Class<?> klass)
Create an image from a class. The image used will be found based on the name of the class.

Parameters:
klass - The Java class after which the file is named.

GreenfootImage

public GreenfootImage(java.lang.String fileName)
Create an image from a file. The image will be found by searching for an appropriate match.

Parameters:
fileName - The name of the image file.

GreenfootImage

public GreenfootImage(Image other)
Create an image that is a duplicate of another image (a copy constructor).

Parameters:
other - The image to copy.


Greenfoot homepage