more explicit names for draw<Shape>
This commit is contained in:
21
src/drawCircle.js
Normal file
21
src/drawCircle.js
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
export default class DrawCircle {
|
||||
constructor(settings) {
|
||||
}
|
||||
|
||||
filled(context, cell) {
|
||||
context.beginPath();
|
||||
context.arc(cell.x, cell.y, cell.scale, 0, 2*Math.PI, false);
|
||||
context.fillStyle = cell.getColor();
|
||||
context.fill();
|
||||
}
|
||||
|
||||
outline(context, cell) {
|
||||
context.beginPath();
|
||||
context.arc(cell.x, cell.y, cell.scale, 0, 2*Math.PI, false);
|
||||
context.lineWidth = cell.width;
|
||||
context.strokeStyle = cell.getColor();
|
||||
context.stroke();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user