de.rico.engine.effect.ortho
Class RectangleRenderer

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

public class RectangleRenderer
extends AbstractOrthoOverlay

This class can be used to draw a 2D overlays in form of a rectangles onto the screen.

Author:
Frank Bruns

Constructor Summary
RectangleRenderer()
           
RectangleRenderer(Color4f color)
          Creates a new rectangle renderer with the specified color.
 
Method Summary
 void drawRectangle(int x, int y, int width, int height)
          Draws a rectangluar area with the specified coordinates and dimensions to the screen.
 void drawRectangle(int x, int y, int width, int height, Color4f c)
          Draws a rectangluar area with the specified coordinates, dimensions and color to the screen.
 
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

RectangleRenderer

public RectangleRenderer()

RectangleRenderer

public RectangleRenderer(Color4f color)
Creates a new rectangle renderer with the specified color.

Parameters:
color - initial RGBA color of the rectangle renderer
Method Detail

drawRectangle

public void drawRectangle(int x,
                          int y,
                          int width,
                          int height)
Draws a rectangluar area with the specified coordinates and dimensions to the screen. (x,y) is the upper left corner of the rectangle.

Parameters:
x - x-coordinate of the rectangle
y - y-coordinate of the rectangle
width - width of the rectangle
height - height of the rectangle

drawRectangle

public void drawRectangle(int x,
                          int y,
                          int width,
                          int height,
                          Color4f c)
Draws a rectangluar area with the specified coordinates, dimensions and color to the screen. (x,y) is the upper left corner of the rectangle.

Parameters:
x - x-coordinate of the rectangle
y - y-coordinate of the rectangle
width - width of the rectangle
height - height of the rectangle
c - RGBA color to use for the rectangle