<commit_before>/**
 * @scope enchant.Surface.prototype
 */
enchant.Surface = enchant.Class.create(enchant.EventTarget, {
    /**
     * @name enchant.Surface
     * @class
     [lang:ja]
     * canvas要素をラップしたクラス.
     *
     * {@link enchant.Sprite} や {@link enchant.Map} のimageプロパティに設定して表示させることができる.
     * Canvas APIにアクセスしたいときは {@link enchant.Surface#context} プロパティを用いる.
     *
     * @example
     * // 円を表示するSpriteを作成する
     * var ball = new Sprite(50, 50);
     * var surface = new Surface(50, 50);
     * surface.context.beginPath();
     * surface.context.arc(25, 25, 25, 0, Math.PI*2, true);
     * surface.context.fill();
     * ball.image = surface;
     *
     * @param {Number} width Surfaceの横幅.
     * @param {Number} height Surfaceの高さ.
     [/lang]
     [lang:en]
     * Class that wraps canvas elements.
     *
     * Can be used to set the {@link enchant.Sprite} and {@link enchant.Map}'s image properties to be displayed.
     * If you wish to access Canvas API use the {@link enchant.Surface#context} property.
     *
     * @example
     * // Creates Sprite that displays a circle.
     * var ball = new Sprite(50, 50);
     * var surface = new Surface(50, 50);
     * surface.context.beginPath();
     * surface.context.arc(25, 25, 25, 0, Math.PI*2, true);
     * surface.context.fill();
     * ball.image = surface;
     *
     * @param {Number} width Surface width.
     * @param {Number} height Surface height.
     [/lang]
     [lang:de]
     * Diese Klasse dient als Hüllenklasse (Wrapper) für Canvas Elemente.
     *
     * Mit dieser Klasse können die image Felder der {@link enchant.Sprite} und {@link enchant.Map}'s
     * Klassen gesetzt werden und dadurch dargestellt werden.
     * Falls die Canvas API genutzt werden möchte kann dies über die
     * {@link enchant.Surface#context} Variable erfolgen.
     *
     * @example
     * // Erstellt einen Sprite und stellt einen Kreis dar.
     * var ball = new Sprite(50, 50);
     * var surface = new Surface(50, 50);
     * surface.context.beginPath();
     * surface.context.arc(25, 25, 25, 0, Math.PI*2, true);
     * surface.context.fill();
     * ball.image = surface;
     *
     * @param {Number} width Die Breite der Surface.
     * @param {Number} height Die Höhe der Surface.
     [/lang]
     * @constructs
     * @extends enchant.EventTarget
     */
    initialize: function(width, height) {
        enchant.EventTarget.call(this);

        var core = enchant.Core.instance;

        /**
         [lang:ja]
         * Surfaceの横幅.
         [/lang]
         [lang:en]
         * Surface width.
         [/lang]
         [lang:de]
         * Die Breite der Surface.
         [/lang]
         * @type Number
         */
        this.width = width;
        /**
         [lang:ja]
         * Surfaceの高さ.
         [/lang]
         [lang:en]
         * Surface height.
         [/lang]
         [lang:de]
         * Die Höhe der Surface.
         [/lang]
         * @type Number
         */
        this.height = height;
        /**
         [lang:ja]
         * Surfaceの描画コンテクスト.
         [/lang]
         [lang:en]
         * Surface drawing context.
         [/lang]
         [lang:de]
         * Der Surface Zeichenkontext.
         [/lang]
         * @type CanvasRenderingContext2D
         */<commit_msg>cast Surface size<commit_after>/**
 * @scope enchant.Surface.prototype
 */
enchant.Surface = enchant.Class.create(enchant.EventTarget, {
    /**
     * @name enchant.Surface
     * @class
     [lang:ja]
     * canvas要素をラップしたクラス.
     *
     * {@link enchant.Sprite} や {@link enchant.Map} のimageプロパティに設定して表示させることができる.
     * Canvas APIにアクセスしたいときは {@link enchant.Surface#context} プロパティを用いる.
     *
     * @example
     * // 円を表示するSpriteを作成する
     * var ball = new Sprite(50, 50);
     * var surface = new Surface(50, 50);
     * surface.context.beginPath();
     * surface.context.arc(25, 25, 25, 0, Math.PI*2, true);
     * surface.context.fill();
     * ball.image = surface;
     *
     * @param {Number} width Surfaceの横幅.
     * @param {Number} height Surfaceの高さ.
     [/lang]
     [lang:en]
     * Class that wraps canvas elements.
     *
     * Can be used to set the {@link enchant.Sprite} and {@link enchant.Map}'s image properties to be displayed.
     * If you wish to access Canvas API use the {@link enchant.Surface#context} property.
     *
     * @example
     * // Creates Sprite that displays a circle.
     * var ball = new Sprite(50, 50);
     * var surface = new Surface(50, 50);
     * surface.context.beginPath();
     * surface.context.arc(25, 25, 25, 0, Math.PI*2, true);
     * surface.context.fill();
     * ball.image = surface;
     *
     * @param {Number} width Surface width.
     * @param {Number} height Surface height.
     [/lang]
     [lang:de]
     * Diese Klasse dient als Hüllenklasse (Wrapper) für Canvas Elemente.
     *
     * Mit dieser Klasse können die image Felder der {@link enchant.Sprite} und {@link enchant.Map}'s
     * Klassen gesetzt werden und dadurch dargestellt werden.
     * Falls die Canvas API genutzt werden möchte kann dies über die
     * {@link enchant.Surface#context} Variable erfolgen.
     *
     * @example
     * // Erstellt einen Sprite und stellt einen Kreis dar.
     * var ball = new Sprite(50, 50);
     * var surface = new Surface(50, 50);
     * surface.context.beginPath();
     * surface.context.arc(25, 25, 25, 0, Math.PI*2, true);
     * surface.context.fill();
     * ball.image = surface;
     *
     * @param {Number} width Die Breite der Surface.
     * @param {Number} height Die Höhe der Surface.
     [/lang]
     * @constructs
     * @extends enchant.EventTarget
     */
    initialize: function(width, height) {
        enchant.EventTarget.call(this);

        var core = enchant.Core.instance;

        /**
         [lang:ja]
         * Surfaceの横幅.
         [/lang]
         [lang:en]
         * Surface width.
         [/lang]
         [lang:de]
         * Die Breite der Surface.
         [/lang]
         * @type Number
         */
        this.width = Math.ceil(width);
        /**
         [lang:ja]
         * Surfaceの高さ.
         [/lang]
         [lang:en]
         * Surface height.
         [/lang]
         [lang:de]
         * Die Höhe der Surface.
         [/lang]
         * @type Number
         */
        this.height = Math.ceil(height);
        /**
         [lang:ja]
         * Surfaceの描画コンテクスト.
         [/lang]
         [lang:en]
         * Surface drawing context.
         [/lang]
         [lang:de]
         * Der Surface Zeichenkontext.
         [/lang]
         * @type CanvasRenderingContext2D
         */
{'fraction_non_alphanumeric': 0.12431941923774954, 'fraction_numerical': 0.014821536600120993, 'mean_word_length': 1.904259991216513, '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': '6915090', 'n_tokens_mistral': 2290, 'n_tokens_neox': 2162, 'n_words': 546}