01: package gnu.kawa.models;
02:
03: import java.awt.*;
04: import java.awt.geom.*;
05:
06: public class DrawShape implements Paintable {
07: Shape shape;
08:
09: public DrawShape(Shape shape) {
10: this .shape = shape;
11: }
12:
13: public void paint(Graphics2D graphics) {
14: graphics.draw(shape);
15: }
16:
17: public Rectangle2D getBounds2D() {
18: return shape.getBounds2D();
19: }
20:
21: public Paintable transform(AffineTransform tr) {
22: return new DrawShape(tr.createTransformedShape(shape));
23: }
24: }
|