/**
 *
 * Beschreibung
 *
 * @version 1.0 vom 04.10.2012
 * @author 
 */

import java.awt.Graphics;

public class GRectangle extends GLine {

    // Anfang Attribute
    // Ende Attribute

    public GRectangle(GPoint point1, GPoint point2) {
        super(point1, point2);
    }

    // Anfang Methoden
    public void draw(Graphics gr) {
        int lox = Math.min(point1.getX(), point2.getX());
        int loy = Math.min(point1.getY(), point2.getY());
        int dx = Math.abs(point2.getX() - point1.getX());
        int dy = Math.abs(point2.getY() - point1.getY());
        gr.drawRect(lox, loy, dx, dy);  
    }

    // Ende Methoden
} // end of GRectangle
