var drowSnowman = function() {
function drawCircle(x, y, radius, fillCirсle) {
ctx.beginPath();
if (fillCirсle === true) {
ctx.lineWidth = 4;
ctx.arc(x, y, radius, 0, Math.PI * 2, false);
ctx.stroke();
} else if (fillCirсle === false) {
ctx.arc(x, y, radius, 0, Math.PI * 2, false);
ctx.fill();
}
};
drawCircle(100, 100, 30, true);
ctx.fillStyle = "orange";
drawCircle(100, 105, 5, false);
ctx.fillStyle = "black";
drawCircle(90, 95, 5, false);
drawCircle(110, 95, 5, false);
drawCircle(100, 170, 40, true);
drawCircle(100, 150, 5, false);
drawCircle(100, 170, 5, false);
drawCircle(100, 190, 5, false);
};
drowSnowman();
var drowSnowman = function(posX, posY) {
function drawCircle(x, y, radius, fillCirсle) {
ctx.beginPath();
if (fillCirсle === true) {
ctx.lineWidth = 4;
ctx.arc(x, y, radius, 0, Math.PI * 2, false);
ctx.stroke();
} else if (fillCirсle === false) {
ctx.arc(x, y, radius, 0, Math.PI * 2, false);
ctx.fill();
}
};
drawCircle(posX+100, posY+100, 30, true);
ctx.fillStyle = "orange";
drawCircle(posX+100, posY+105, 5, false);
ctx.fillStyle = "black";
drawCircle(posX+90, posY+95, 5, false);
drawCircle(posX+110, posY+95, 5, false);
drawCircle(posX+100, posY+170, 40, true);
drawCircle(posX+100, posY+150, 5, false);
drawCircle(posX+100, posY+170, 5, false);
drawCircle(posX+100, posY+190, 5, false);
};
drowSnowman(200,150);
drowSnowman(500,450);