24 lines
489 B
Plaintext
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);
|
|
}
|
|
|
|
} |