"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.draw = draw;
function draw(ctx, step) {
    const method = step[0];
    const args = step.slice(1, step.length);
    if (method === 'fillStyle') {
        ctx.fillStyle = args[0];
    }
    else if (method === 'strokeStyle') {
        ctx.strokeStyle = args[0];
    }
    else if (method === 'lineWidth') {
        ctx.lineWidth = args[0];
    }
    else if (method === 'fillPath') {
        const [d, fillRule] = args;
        ctx.fill(new Path2D(d), fillRule);
    }
    else if (method === 'strokePath') {
        const [d] = args;
        ctx.stroke(new Path2D(d));
    }
    else {
        ctx[method](...args);
    }
}
//# sourceMappingURL=draw.js.map