| 1 | public class Rectangle extends Shape { |
| 2 | private final float width; |
| 3 | private final float height; |
| 4 | |
| 5 | public Rectangle(Renderer renderer, float width, float height) { |
| 6 | super(renderer); |
| 7 | this.width = width; |
| 8 | this.height = height; |
| 9 | } |
| 10 | |
| 11 | @Override |
| 12 | public void draw() { |
| 13 | renderer.renderRectangle(width, height); |
| 14 | } |
| 15 | } |