rectangle painting fix, circle painting fix

This commit is contained in:
Blue 2018-11-19 12:57:32 +03:00
parent 57c642ca06
commit 366c0eb977
2 changed files with 2 additions and 1 deletions

View File

@ -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() {

View File

@ -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() {