"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Semifunctional_1 = require("../../../../../Class/Semifunctional");
const _ids_1 = require("../../../../_ids");
class PutImageData extends Semifunctional_1.Semifunctional {
    constructor(system) {
        super({
            fi: ['any', 'canvas', 'image', 'dx', 'dy', 'x', 'y', 'width', 'height'],
            fo: ['done'],
            i: [],
        }, {
            input: {
                canvas: {
                    ref: true,
                },
                image: {
                    ref: true,
                },
            },
            output: {},
        }, system, _ids_1.ID_PUT_IMAGE_DATA);
    }
    async f({ canvas, image, dx, dy, x, y, width, height }, done) {
        const imageData = image.imageData();
        await canvas.putImageData(imageData, dx, dy, x, y, width, height);
        done({
            done: true,
        });
    }
}
exports.default = PutImageData;
//# sourceMappingURL=index.js.map