racket/collects/htdch/graphics/DrawLine.djava
2006-01-27 22:16:14 +00:00

24 lines
489 B
Plaintext

package graphics;
import scheme.lib.htdch.graphics.rename;
public class DrawLine extends Command {
public Color color;
public Posn start;
public Posn stop;
public int width;
public DrawLine( Posn s, Posn e, int w, Color c ) {
this.color = c;
this.start = s;
this.stop = e;
this.width = w;
}
void issue( dynamic dc ) {
dc.setPen(color.toString(), width ,rename.toSymbol("solid"));
dc.drawLine( start.x,start.y,stop.x,stop.y);
}
}