import Shape from './shape'; import { ImageOptions } from '../models/painter'; class Image extends Shape { draw(): void { const { image, x, y } = this.config as ImageOptions; this.ctx.save(); this.ctx.beginPath(); this.ctx.drawImage(image, x, y); this.ctx.closePath(); this.ctx.restore(); } } export default Image;