"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../../Class/Functional");
const _ids_1 = require("../../../../_ids");
class DrawImage extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['canvas', 'image', 'x', 'y', 'width', 'height', 'any'],
            o: [],
        }, {
            input: {
                canvas: {
                    ref: true,
                },
                image: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_DRAW_IMAGE);
    }
    async f({ any, canvas, image, x, y, width, height }, done) {
        const _image = await image.image();
        await canvas.drawImage(_image, x, y, width, height);
        done();
    }
}
exports.default = DrawImage;
//# sourceMappingURL=index.js.map