All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.assets.rjzjh.zrender.graphic.Pattern.js Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
define(function (require) {

    var Pattern = function (image, repeat) {
        this.image = image;
        this.repeat = repeat;
    };

    Pattern.prototype.type = 'pattern';

    Pattern.prototype.getCanvasPattern = function (ctx) {

        return this._canvasPattern
            || (this._canvasPattern = ctx.createPattern(this.image, this.repeat));
    };

    return Pattern;
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy