/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package borrame;

import java.awt.Color;
import java.awt.Graphics;

public class Linea implements Figura {
    int x0, y0, x1, y1;
    Color c;
    
    public Linea() {        
    }

    public void set(int x0, int y0, int x1, int y1, Color c) {
        this.x0 = x0;
        this.y0 = y0;
        this.x1 = x1;
        this.y1 = y1;
        this.c = c;
    }

    public void dibuja(Graphics g) {
        g.setColor(c);
        g.drawLine(x0, y0, x1, y1);
                System.out.println(x0 + " " + y0 + " " + x1 + " " + y1);

    }
}
