de.rico.engine.effect.ortho
Class ImageRenderer

java.lang.Object
  extended by de.rico.engine.effect.ortho.AbstractOrthoOverlay
      extended by de.rico.engine.effect.ortho.ImageRenderer

public class ImageRenderer
extends AbstractOrthoOverlay

This class can be used to draw an image as a 2D overlay onto the screen.

Author:
Frank Bruns

Constructor Summary
ImageRenderer()
          Creates a new image renderer object.
ImageRenderer(Color4f color)
          Creates a new image renderer object with the specified default color.
 
Method Summary
 void drawImage(int x, int y, int width, int height, OverlayImage img)
          Draws an overlay image at the specified position.
 void drawImage(int x, int y, int width, int height, OverlayImage img, boolean maskBlack)
          Draws an overlay image at the specified position.
 void drawImage(int x, int y, int width, int height, OverlayImage img, Color4f c)
          Draws an overlay image at the specified position.
 void drawImage(int x, int y, int width, int height, OverlayImage img, Color4f c, boolean maskBlack)
          Draws an overlay image at the specified position.
 void drawImage(int x, int y, OverlayImage img)
          Draws an overlay image at the specified position.
 void drawImage(int x, int y, OverlayImage img, boolean maskBlack)
          Draws an overlay image at the specified position.
 void drawImage(int x, int y, OverlayImage img, Color4f c)
          Draws an overlay image at the specified position.
 void drawImage(int x, int y, OverlayImage img, Color4f c, boolean maskBlack)
          Draws an overlay image at the specified position.
 boolean isMaskedBlackColor()
          Determines whether or not black parts of rendered overlay images are masked by default.
 void setMaskedBlackColor(boolean maskBlack)
          Enables or disables masking of black colored parts of the overlay image by default.
 
Methods inherited from class de.rico.engine.effect.ortho.AbstractOrthoOverlay
getColor, setColor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageRenderer

public ImageRenderer()
Creates a new image renderer object.


ImageRenderer

public ImageRenderer(Color4f color)
Creates a new image renderer object with the specified default color.

Parameters:
color - default color to use for the images
Method Detail

setMaskedBlackColor

public void setMaskedBlackColor(boolean maskBlack)
Enables or disables masking of black colored parts of the overlay image by default. If enabled, black parts of rendered images will be completetly transparent.

Parameters:
maskBlack - mask black color? --> true=yes, false=no

isMaskedBlackColor

public boolean isMaskedBlackColor()
Determines whether or not black parts of rendered overlay images are masked by default.

Returns:
is black color maksed? --> true=yes, false=no

drawImage

public void drawImage(int x,
                      int y,
                      OverlayImage img)
Draws an overlay image at the specified position. (x,y) is the upper left corner of the image.

Parameters:
x - x-coordinate for the overlay image
y - y-coordinate for the overlay image
img - overlay image to display

drawImage

public void drawImage(int x,
                      int y,
                      int width,
                      int height,
                      OverlayImage img)
Draws an overlay image at the specified position. (x,y) is the upper left corner of the image. This method can be used to specify the desired width and height of the image to be drawn width.

Parameters:
x - x-coordinate for the overlay image
y - y-coordinate for the overlay image
width - width to draw the image with
height - height to draw the image with
img - overlay image to display

drawImage

public void drawImage(int x,
                      int y,
                      OverlayImage img,
                      Color4f c)
Draws an overlay image at the specified position. (x,y) is the upper left corner of the image.

Parameters:
x - x-coordinate for the overlay image
y - y-coordinate for the overlay image
img - overlay image to display
c - RGBA color to use for the overlay image

drawImage

public void drawImage(int x,
                      int y,
                      OverlayImage img,
                      boolean maskBlack)
Draws an overlay image at the specified position. (x,y) is the upper left corner of the image. The black color masking setting can be set explicitly for the specified image.

Parameters:
x - x-coordinate for the overlay image
y - y-coordinate for the overlay image
img - overlay image to display
maskBlack - mask black color? --> true=yes, false=no

drawImage

public void drawImage(int x,
                      int y,
                      OverlayImage img,
                      Color4f c,
                      boolean maskBlack)
Draws an overlay image at the specified position. (x,y) is the upper left corner of the image. The black color masking setting can be set explicitly for the specified image.

Parameters:
x - x-coordinate for the overlay image
y - y-coordinate for the overlay image
img - overlay image to display
c - RGBA color to use for the overlay image
maskBlack - mask black color? --> true=yes, false=no

drawImage

public void drawImage(int x,
                      int y,
                      int width,
                      int height,
                      OverlayImage img,
                      Color4f c)
Draws an overlay image at the specified position. (x,y) is the upper left corner of the image.

Parameters:
x - x-coordinate for the overlay image
y - y-coordinate for the overlay image
img - overlay image to display
c - RGBA color to use for the overlay image

drawImage

public void drawImage(int x,
                      int y,
                      int width,
                      int height,
                      OverlayImage img,
                      boolean maskBlack)
Draws an overlay image at the specified position. (x,y) is the upper left corner of the image. The black color masking setting can be set explicitly for the specified image.

Parameters:
x - x-coordinate for the overlay image
y - y-coordinate for the overlay image
width - width to draw the image with
height - height to draw the image with
img - overlay image to display
maskBlack - mask black color? --> true=yes, false=no

drawImage

public void drawImage(int x,
                      int y,
                      int width,
                      int height,
                      OverlayImage img,
                      Color4f c,
                      boolean maskBlack)
Draws an overlay image at the specified position. (x,y) is the upper left corner of the image. The black color masking setting can be set explicitly for the specified image.

Parameters:
x - x-coordinate for the overlay image
y - y-coordinate for the overlay image
width - width to draw the image with
height - height to draw the image with
img - overlay image to display
c - RGBA color to use for the overlay image
maskBlack - mask black color? --> true=yes, false=no