Environment2D
Class FilledRectangle2D

java.lang.Object
  extended by Environment2D.Shape2D
      extended by Environment2D.Rectangle2D
          extended by Environment2D.FilledRectangle2D

public class FilledRectangle2D
extends Rectangle2D

A rectangle with a nice filled in middle.


Field Summary
 
Fields inherited from class Environment2D.Shape2D
colour, h, w, x, y
 
Constructor Summary
FilledRectangle2D(double p_x, double p_y, double p_w, double p_h, java.awt.Color p_colour)
          Creates a new filled rectangle.
 
Method Summary
 void paintAdjusted(java.awt.Graphics g, java.awt.Dimension p_graphicsSize, Viewport2D p_view)
          Paints a filled rectangle onto a graphics plane, adjusting for the viewport and final output size.
 
Methods inherited from class Environment2D.Shape2D
getAdjustedScalar, getAdjustedShape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilledRectangle2D

public FilledRectangle2D(double p_x,
                         double p_y,
                         double p_w,
                         double p_h,
                         java.awt.Color p_colour)
Creates a new filled rectangle.

Parameters:
p_x - The x co-ordinate to draw the top-left from.
p_y - The y co-ordinate to draw the top-left from.
p_w - The width of the shape
p_h - The height of the shape
p_colour - The colour of this shape
Method Detail

paintAdjusted

public void paintAdjusted(java.awt.Graphics g,
                          java.awt.Dimension p_graphicsSize,
                          Viewport2D p_view)
Paints a filled rectangle onto a graphics plane, adjusting for the viewport and final output size.

Overrides:
paintAdjusted in class Rectangle2D
Parameters:
g - The graphics plane on which to draw.
p_graphicsSize - The size of the graphics plane (or portion to output onto)
p_view - The viewport, defining what portions of the plane to output