android.image
Class FromResource

java.lang.Object
  extended by android.image.Image
      extended by android.image.RasterImage
          extended by android.image.FromFile
              extended by android.image.FromResource

public class FromResource
extends FromFile

Represents an Image from an Android Project Resource.


Field Summary
 
Fields inherited from class android.image.Image
BLACK_OUTLINE, CLEAR, WHITE
 
Constructor Summary
FromResource(android.content.res.Resources res, int id)
          Create an Image from the given Resources and ID.
 
Method Summary
 
Methods inherited from class android.image.RasterImage
getCanvas, getPixel, getPixelAsString, height, paint, setPixel, setPixel, setPixel, setPixel, setPixel, width
 
Methods inherited from class android.image.Image
flipHorizontal, flipVertical, overlay, overlay, overlayxy, overlayxy, overlayxy, overlayxy, overlayxy, overlayxy, rasterize, rotate, rotate, toFile, toScene, toWhiteFile, toWhiteScene
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FromResource

public FromResource(android.content.res.Resources res,
                    int id)
Create an Image from the given Resources and ID. In an Eclipse Android project, adding an image to the res/drawable-* directories causes resource IDs to be generated in the R class. The application's Resources instance can be obtained from the current Activity using ContextWrapper.getResources(). Image resource IDs are cached so that images are only loaded once.