<commit_before>    /**
 * @namespace
 */
Z.renderer={};

/**
 * @classdesc
 * Base Class for all the renderer based on HTML5 Canvas2D
 * @abstract
 * @class
 * @protected
 * @memberOf maptalks.renderer
 * @name Canvas
 * @extends {maptalks.Class}
 */
Z.renderer.Canvas=Z.Class.extend(/** @lends maptalks.renderer.Canvas.prototype */{
    isCanvasRender:function() {
        return true;
    },

    render:function() {
        this._prepareRender();
        if (!this.getMap()) {
            return;
        }
        if (!this._layer.isVisible()) {
            this._requestMapToRender();
            this._fireLoadedEvent();
            return;
        }
        this._render.apply(this, arguments);
    },

    getMap: function() {
        return this._layer.getMap();
    },

    getLayer:function() {
        return this._layer;
    },

    getCanvasImage:function() {
        if (this._layer.isEmpty() || !this._viewExtent) {
            return null;
        }
        var size = this._viewExtent.getSize();
        var point = this._viewExtent.getMin();
        return {'image':this._canvas,'layer':this._layer,'point':this.getMap().viewPointToContainerPoint(point)._round(),'size':size};
    },

    isLoaded:function() {
        if (this._loaded) {
            return true;
        }
        return false;
    },

    /**
     * 显示图层
     */
    show: function() {
        var mask = this._layer.getMask();<commit_msg>fixed an error in getCanvasImage<commit_after>    /**
 * @namespace
 */
Z.renderer={};

/**
 * @classdesc
 * Base Class for all the renderer based on HTML5 Canvas2D
 * @abstract
 * @class
 * @protected
 * @memberOf maptalks.renderer
 * @name Canvas
 * @extends {maptalks.Class}
 */
Z.renderer.Canvas=Z.Class.extend(/** @lends maptalks.renderer.Canvas.prototype */{
    isCanvasRender:function() {
        return true;
    },

    render:function() {
        this._prepareRender();
        if (!this.getMap()) {
            return;
        }
        if (!this._layer.isVisible()) {
            this._requestMapToRender();
            this._fireLoadedEvent();
            return;
        }
        this._render.apply(this, arguments);
    },

    getMap: function() {
        return this._layer.getMap();
    },

    getLayer:function() {
        return this._layer;
    },

    getCanvasImage:function() {
        if ((this._layer.isEmpty && this._layer.isEmpty()) || !this._viewExtent) {
            return null;
        }
        var size = this._viewExtent.getSize();
        var point = this._viewExtent.getMin();
        return {'image':this._canvas,'layer':this._layer,'point':this.getMap().viewPointToContainerPoint(point)._round(),'size':size};
    },

    isLoaded:function() {
        if (this._loaded) {
            return true;
        }
        return false;
    },

    /**
     * 显示图层
     */
    show: function() {
        var mask = this._layer.getMask();
{'fraction_non_alphanumeric': 0.14906832298136646, 'fraction_numerical': 0.0013802622498274672, 'mean_word_length': 2.100534759358289, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2232835', 'n_tokens_mistral': 885, 'n_tokens_neox': 884, 'n_words': 154}