Environment2D
Class Rectangle2D

java.lang.Object
  extended by Environment2D.Shape2D
      extended by Environment2D.Rectangle2D
Direct Known Subclasses:
FilledRectangle2D

public class Rectangle2D
extends Shape2D


Field Summary
 
Fields inherited from class Environment2D.Shape2D
colour, h, w, x, y
 
Constructor Summary
Rectangle2D(double p_x, double p_y, double p_w, double p_h, java.awt.Color p_colour)
          Creates a new rectangle.
 
Method Summary
 void paintAdjusted(java.awt.Graphics g, java.awt.Dimension p_graphicsSize, Viewport2D p_view)
          Paints a 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

Rectangle2D

public Rectangle2D(double p_x,
                   double p_y,
                   double p_w,
                   double p_h,
                   java.awt.Color p_colour)
Creates a new 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 rectangle onto a graphics plane, adjusting for the viewport and final output size.

Overrides:
paintAdjusted in class Shape2D
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