org.apache.pivot.wtk.media
Class Picture

java.lang.Object
  extended by org.apache.pivot.wtk.media.Image
      extended by org.apache.pivot.wtk.media.Picture
All Implemented Interfaces:
Visual

public class Picture
extends Image

Image representing a bitmapped picture.


Nested Class Summary
static class Picture.Interpolation
          Enum defining the algorithms to apply when resizing a picture.
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.media.Image
Image.ImageListenerList, Image.LoadTask
 
Field Summary
 
Fields inherited from class org.apache.pivot.wtk.media.Image
imageListeners
 
Constructor Summary
Picture(BufferedImage bufferedImage)
           
 
Method Summary
 int getBaseline()
          Returns the visual's baseline.
 BufferedImage getBufferedImage()
           
 int getHeight()
          Returns the visual's height.
 int getWidth()
          Returns the visual's width.
 void paint(Graphics2D graphics)
          Paints the visual.
 void resample(int size)
           
 void resample(int width, int height)
           
 void resample(int width, int height, Picture.Interpolation interpolation)
           
 void resample(int size, Picture.Interpolation interpolation)
           
 void setBaseline(int baseline)
           
 
Methods inherited from class org.apache.pivot.wtk.media.Image
getImageListeners, getSize, load, load, loadFromCache, toString, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Picture

public Picture(BufferedImage bufferedImage)
Method Detail

getBufferedImage

public BufferedImage getBufferedImage()

getWidth

public int getWidth()
Description copied from interface: Visual
Returns the visual's width.


getHeight

public int getHeight()
Description copied from interface: Visual
Returns the visual's height.


resample

public void resample(int size)

resample

public void resample(int size,
                     Picture.Interpolation interpolation)

resample

public void resample(int width,
                     int height)

resample

public void resample(int width,
                     int height,
                     Picture.Interpolation interpolation)

getBaseline

public int getBaseline()
Description copied from interface: Visual
Returns the visual's baseline.

Specified by:
getBaseline in interface Visual
Overrides:
getBaseline in class Image
Returns:
The baseline relative to the origin of the visual, or -1 if this visual does not have a baseline.

setBaseline

public void setBaseline(int baseline)

paint

public void paint(Graphics2D graphics)
Description copied from interface: Visual
Paints the visual.

Parameters:
graphics - The graphics context in which to paint the visual.