diff --git a/painting/circle.js b/painting/circle.js index 09f9ff8..b51b270 100644 --- a/painting/circle.js +++ b/painting/circle.js @@ -8,6 +8,7 @@ class Circle extends Shape { } draw(ctx) { ctx.arc(this._x, this._y, this._r, 0, Math.PI * 2); + ctx.fill(); } static randomOptions() { diff --git a/painting/rectangle.js b/painting/rectangle.js index d83ff36..0969b8a 100644 --- a/painting/rectangle.js +++ b/painting/rectangle.js @@ -8,7 +8,7 @@ class Rectangle extends Shape { this._height = height; } draw(context) { - context.fillRect(this._x, this._y, this._x + this._width, this._y + this._height); + context.fillRect(this._x, this._y, this._width, this._height); } static randomOptions() {