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

27 lines
639 B
Plaintext

package graphics;
import scheme.lib.htdch.graphics.rename;
public class DrawRectangle extends Command {
public Color color;
public Posn corner;
public int width;
public int height;
public String style;
public DrawRectangle( Posn corner, int w, int h, Color c, String style ) {
this.color = c;
this.width = w;
this.height = h;
this.style = style;
this.corner = corner;
}
void issue( dynamic dc ) {
dc.setPen(color.toString(), 1 ,rename.toSymbol("solid"));
dc.setBrush(color.toString(), rename.toSymbol(style));
dc.drawRectangle( corner.x,corner.y,width, height);
}
}