org.j3d.geom.overlay
Class ImageOverlay
- public class ImageOverlay- extends org.j3d.geom.overlay.OverlayBase
- An overlay that draws an image on screen at the given position. 
 
- Version:
- $Revision: 1.2 $
- Author:
- Justin Couch
ImageOverlay
public ImageOverlay(javax.media.j3d.Canvas3D canvas,
                    java.awt.Dimension size,
                    java.awt.image.BufferedImage image)
- Construct a new overlay that paints the image in the given space. The image is assumed to have an alpha component but it is not blended.
 
- Parameters:
- canvas- The canvas to put the overlay on
- size- The size of the overlay in pixels
- image- The image to display
ImageOverlay
public ImageOverlay(javax.media.j3d.Canvas3D canvas,
                    java.awt.Dimension size,
                    boolean clipAlpha,
                    boolean blendAlpha,
                    java.awt.image.BufferedImage image)
- Construct a new overlay that paints the image in the given space and has control over the alpha.
 
- Parameters:
- canvas- The canvas to put the overlay on
- size- The size of the overlay in pixels
- clipAlpha- true if the image contains alpha
- blendAlpha- true if you want to blend the image with the background of the overlay (ie let the color show through)
- image- The image to display
setImage
public void setImage(java.awt.image.BufferedImage img)
- Change the displayed image to this new image.
 
- Parameters:
- img- The new image to see
repaint
public void repaint()
- Repaint the overlay now. Overridden to provide an empty implementation as the repaint is performed with the buffers.