Home

class: CanvasTinter


Methods summary


Public methods
public static constructor(): void

Properties


Name Type Attribute Description
getTintedTexture public

Basically this method just needs a sprite and a color and tints the sprite with the given color.

tintWithMultiply public

Tint a texture using the 'multiply' operation.

tintWithOverlay public

Tint a texture using the 'overlay' operation.

tintWithPerPixel public

Tint a texture pixel per pixel.

roundColor public

Rounds the specified color according to the CanvasTinter.cacheStepsPerColorChannel.

cacheStepsPerColorChannel number public

Number of steps which will be used as a cap when rounding colors.

convertTintToImage boolean public

Tint cache boolean flag.

canUseMultiply boolean public

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.

tintMethod tintMethodFunctionType public

The tinting method that will be used.

tintMethodFunctionType function public

The tintMethod type.

getTintedTexture public

Basically this method just needs a sprite and a color and tints the sprite with the given color.

tintWithMultiply public

Tint a texture using the 'multiply' operation.

tintWithOverlay public

Tint a texture using the 'overlay' operation.

tintWithPerPixel public

Tint a texture pixel per pixel.

roundColor public

Rounds the specified color according to the CanvasTinter.cacheStepsPerColorChannel.

cacheStepsPerColorChannel number public

Number of steps which will be used as a cap when rounding colors.

convertTintToImage boolean public

Tint cache boolean flag.

canUseMultiply boolean public

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.

tintMethod tintMethodFunctionType public

The tinting method that will be used.

tintMethodFunctionType function public

The tintMethod type.

Methods


constructor(): void

Utility methods for Sprite/Texture tinting.

Returns:

void


  {
    "comment": "/**\n * Utility methods for Sprite/Texture tinting.\n *\n * @class\n * @memberof PIXI\n */",
    "meta": {
        "range": [
            237,
            7439
        ],
        "filename": "CanvasTinter.js",
        "lineno": 10,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas",
        "code": {
            "id": "astnode100032779",
            "name": "CanvasTinter",
            "type": "ObjectExpression",
            "value": "{\"getTintedTexture\":\"\",\"tintWithMultiply\":\"\",\"tintWithOverlay\":\"\",\"tintWithPerPixel\":\"\",\"roundColor\":\"\",\"cacheStepsPerColorChannel\":8,\"convertTintToImage\":false,\"canUseMultiply\":\"\",\"tintMethod\":0}"
        }
    },
    "description": "

Utility methods for Sprite/Texture tinting.

", "kind": "class", "memberof": "PIXI", "name": "CanvasTinter", "longname": "PIXI.CanvasTinter", "scope": "static", "___id": "T000002R002978", "___s": true, "$methods": [ { "comment": "/**\n * Utility methods for Sprite/Texture tinting.\n *\n * @class\n * @memberof PIXI\n */", "meta": { "range": [ 237, 7439 ], "filename": "CanvasTinter.js", "lineno": 10, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100032779", "name": "CanvasTinter", "type": "ObjectExpression", "value": "{\"getTintedTexture\":\"\",\"tintWithMultiply\":\"\",\"tintWithOverlay\":\"\",\"tintWithPerPixel\":\"\",\"roundColor\":\"\",\"cacheStepsPerColorChannel\":8,\"convertTintToImage\":false,\"canUseMultiply\":\"\",\"tintMethod\":0}" } }, "description": "

Utility methods for Sprite/Texture tinting.

", "kind": "class", "memberof": "PIXI", "name": "constructor", "longname": "PIXI.CanvasTinter", "scope": "static", "___id": "T000002R002978", "___s": true, "$methods": [], "$attributes": [], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [], "classConstructor": true, "slug": "constructor" } ], "$attributes": [ { "comment": "/**\n * Basically this method just needs a sprite and a color and tints the sprite with the given color.\n *\n * @memberof PIXI.CanvasTinter\n * @param {PIXI.Sprite} sprite - the sprite to tint\n * @param {number} color - the color to use to tint the sprite with\n * @return {HTMLCanvasElement} The tinted canvas\n */", "meta": { "range": [ 601, 1740 ], "filename": "CanvasTinter.js", "lineno": 19, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100032782", "name": "getTintedTexture", "type": "ArrowFunctionExpression" }, "vars": { "texture": "PIXI.CanvasTinter.getTintedTexture~texture", "color": "PIXI.CanvasTinter.getTintedTexture~color", "stringColor": "PIXI.CanvasTinter.getTintedTexture~stringColor", "texture.tintCache": "PIXI.CanvasTinter.getTintedTexture~texture.tintCache", "canvas": "PIXI.CanvasTinter.getTintedTexture~canvas", "tintImage": "PIXI.CanvasTinter.getTintedTexture~tintImage", "tintImage.src": "PIXI.CanvasTinter.getTintedTexture~tintImage.src", "texture.tintCache[undefined]": "PIXI.CanvasTinter.getTintedTexture~texture.tintCache[undefined]", "CanvasTinter.canvas": "PIXI.CanvasTinter.canvas" } }, "description": "

Basically this method just needs a sprite and a color and tints the sprite with the given color.

", "memberof": "PIXI.CanvasTinter", "params": [ { "type": { "names": [ "PIXI.Sprite" ] }, "description": "

the sprite to tint

", "name": "sprite" }, { "type": { "names": [ "number" ] }, "description": "

the color to use to tint the sprite with

", "name": "color" } ], "returns": [ { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

The tinted canvas

" } ], "name": "getTintedTexture", "longname": "PIXI.CanvasTinter.getTintedTexture", "kind": "function", "scope": "static", "___id": "T000002R002979", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.getTintedTexture", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Tint a texture using the 'multiply' operation.\n *\n * @memberof PIXI.CanvasTinter\n * @param {PIXI.Texture} texture - the texture to tint\n * @param {number} color - the color to use to tint the sprite with\n * @param {HTMLCanvasElement} canvas - the current canvas\n */", "meta": { "range": [ 2052, 3241 ], "filename": "CanvasTinter.js", "lineno": 67, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100032909", "name": "tintWithMultiply", "type": "ArrowFunctionExpression" }, "vars": { "context": "PIXI.CanvasTinter.tintWithMultiply~context", "crop": "PIXI.CanvasTinter.tintWithMultiply~crop", "resolution": "PIXI.CanvasTinter.tintWithMultiply~resolution", "crop.x": "PIXI.CanvasTinter.tintWithMultiply~crop.x", "crop.y": "PIXI.CanvasTinter.tintWithMultiply~crop.y", "crop.width": "PIXI.CanvasTinter.tintWithMultiply~crop.width", "crop.height": "PIXI.CanvasTinter.tintWithMultiply~crop.height", "canvas.width": "canvas.width", "canvas.height": "canvas.height", "context.fillStyle": "PIXI.CanvasTinter.tintWithMultiply~context.fillStyle", "context.globalCompositeOperation": "PIXI.CanvasTinter.tintWithMultiply~context.globalCompositeOperation" } }, "description": "

Tint a texture using the 'multiply' operation.

", "memberof": "PIXI.CanvasTinter", "params": [ { "type": { "names": [ "PIXI.Texture" ] }, "description": "

the texture to tint

", "name": "texture" }, { "type": { "names": [ "number" ] }, "description": "

the color to use to tint the sprite with

", "name": "color" }, { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

the current canvas

", "name": "canvas" } ], "name": "tintWithMultiply", "longname": "PIXI.CanvasTinter.tintWithMultiply", "kind": "function", "scope": "static", "___id": "T000002R002990", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.tintWithMultiply", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Tint a texture using the 'overlay' operation.\n *\n * @memberof PIXI.CanvasTinter\n * @param {PIXI.Texture} texture - the texture to tint\n * @param {number} color - the color to use to tint the sprite with\n * @param {HTMLCanvasElement} canvas - the current canvas\n */", "meta": { "range": [ 3552, 4537 ], "filename": "CanvasTinter.js", "lineno": 122, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100033096", "name": "tintWithOverlay", "type": "FunctionExpression" }, "vars": { "context": "PIXI.CanvasTinter.tintWithOverlay~context", "crop": "PIXI.CanvasTinter.tintWithOverlay~crop", "resolution": "PIXI.CanvasTinter.tintWithOverlay~resolution", "crop.x": "PIXI.CanvasTinter.tintWithOverlay~crop.x", "crop.y": "PIXI.CanvasTinter.tintWithOverlay~crop.y", "crop.width": "PIXI.CanvasTinter.tintWithOverlay~crop.width", "crop.height": "PIXI.CanvasTinter.tintWithOverlay~crop.height", "canvas.width": "canvas.width", "canvas.height": "canvas.height", "context.globalCompositeOperation": "PIXI.CanvasTinter.tintWithOverlay~context.globalCompositeOperation", "context.fillStyle": "PIXI.CanvasTinter.tintWithOverlay~context.fillStyle" } }, "description": "

Tint a texture using the 'overlay' operation.

", "memberof": "PIXI.CanvasTinter", "params": [ { "type": { "names": [ "PIXI.Texture" ] }, "description": "

the texture to tint

", "name": "texture" }, { "type": { "names": [ "number" ] }, "description": "

the color to use to tint the sprite with

", "name": "color" }, { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

the current canvas

", "name": "canvas" } ], "name": "tintWithOverlay", "longname": "PIXI.CanvasTinter.tintWithOverlay", "kind": "function", "scope": "static", "___id": "T000002R003003", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.tintWithOverlay", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Tint a texture pixel per pixel.\n *\n * @memberof PIXI.CanvasTinter\n * @param {PIXI.Texture} texture - the texture to tint\n * @param {number} color - the color to use to tint the sprite with\n * @param {HTMLCanvasElement} canvas - the current canvas\n */", "meta": { "range": [ 4834, 6041 ], "filename": "CanvasTinter.js", "lineno": 164, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100033253", "name": "tintWithPerPixel", "type": "ArrowFunctionExpression" }, "vars": { "context": "PIXI.CanvasTinter.tintWithPerPixel~context", "crop": "PIXI.CanvasTinter.tintWithPerPixel~crop", "resolution": "PIXI.CanvasTinter.tintWithPerPixel~resolution", "crop.x": "PIXI.CanvasTinter.tintWithPerPixel~crop.x", "crop.y": "PIXI.CanvasTinter.tintWithPerPixel~crop.y", "crop.width": "PIXI.CanvasTinter.tintWithPerPixel~crop.width", "crop.height": "PIXI.CanvasTinter.tintWithPerPixel~crop.height", "canvas.width": "canvas.width", "canvas.height": "canvas.height", "context.globalCompositeOperation": "PIXI.CanvasTinter.tintWithPerPixel~context.globalCompositeOperation", "rgbValues": "PIXI.CanvasTinter.tintWithPerPixel~rgbValues", "r": "PIXI.CanvasTinter.tintWithPerPixel~r", "g": "PIXI.CanvasTinter.tintWithPerPixel~g", "b": "PIXI.CanvasTinter.tintWithPerPixel~b", "pixelData": "PIXI.CanvasTinter.tintWithPerPixel~pixelData", "pixels": "PIXI.CanvasTinter.tintWithPerPixel~pixels", "i": "PIXI.CanvasTinter.tintWithPerPixel~i", "pixels[undefined]": "PIXI.CanvasTinter.tintWithPerPixel~pixels.undefined]" } }, "description": "

Tint a texture pixel per pixel.

", "memberof": "PIXI.CanvasTinter", "params": [ { "type": { "names": [ "PIXI.Texture" ] }, "description": "

the texture to tint

", "name": "texture" }, { "type": { "names": [ "number" ] }, "description": "

the color to use to tint the sprite with

", "name": "color" }, { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

the current canvas

", "name": "canvas" } ], "name": "tintWithPerPixel", "longname": "PIXI.CanvasTinter.tintWithPerPixel", "kind": "function", "scope": "static", "___id": "T000002R003016", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.tintWithPerPixel", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Rounds the specified color according to the CanvasTinter.cacheStepsPerColorChannel.\n *\n * @memberof PIXI.CanvasTinter\n * @param {number} color - the color to round, should be a hex color\n * @return {number} The rounded color.\n */", "meta": { "range": [ 6313, 6692 ], "filename": "CanvasTinter.js", "lineno": 217, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100033459", "name": "roundColor", "type": "ArrowFunctionExpression" }, "vars": { "step": "PIXI.CanvasTinter.roundColor~step", "rgbValues": "PIXI.CanvasTinter.roundColor~rgbValues", "rgbValues[0]": "PIXI.CanvasTinter.roundColor~rgbValues.0]", "rgbValues[1]": "PIXI.CanvasTinter.roundColor~rgbValues.1]", "rgbValues[2]": "PIXI.CanvasTinter.roundColor~rgbValues.2]" } }, "description": "

Rounds the specified color according to the CanvasTinter.cacheStepsPerColorChannel.

", "memberof": "PIXI.CanvasTinter", "params": [ { "type": { "names": [ "number" ] }, "description": "

the color to round, should be a hex color

", "name": "color" } ], "returns": [ { "type": { "names": [ "number" ] }, "description": "

The rounded color.

" } ], "name": "roundColor", "longname": "PIXI.CanvasTinter.roundColor", "kind": "function", "scope": "static", "___id": "T000002R003038", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.roundColor", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Number of steps which will be used as a cap when rounding colors.\n *\n * @memberof PIXI.CanvasTinter\n * @type {number}\n */", "meta": { "range": [ 6852, 6880 ], "filename": "CanvasTinter.js", "lineno": 236, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100033530", "name": "cacheStepsPerColorChannel", "type": "Literal", "value": 8 } }, "description": "

Number of steps which will be used as a cap when rounding colors.

", "memberof": "PIXI.CanvasTinter", "type": { "names": [ "number" ] }, "name": "cacheStepsPerColorChannel", "longname": "PIXI.CanvasTinter.cacheStepsPerColorChannel", "kind": "member", "scope": "static", "___id": "T000002R003044", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.cacheStepsPerColorChannel", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Tint cache boolean flag.\n *\n * @memberof PIXI.CanvasTinter\n * @type {boolean}\n */", "meta": { "range": [ 7000, 7025 ], "filename": "CanvasTinter.js", "lineno": 244, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100033532", "name": "convertTintToImage", "type": "Literal", "value": false } }, "description": "

Tint cache boolean flag.

", "memberof": "PIXI.CanvasTinter", "type": { "names": [ "boolean" ] }, "name": "convertTintToImage", "longname": "PIXI.CanvasTinter.convertTintToImage", "kind": "member", "scope": "static", "___id": "T000002R003045", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.convertTintToImage", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.\n *\n * @memberof PIXI.CanvasTinter\n * @type {boolean}\n */", "meta": { "range": [ 7232, 7275 ], "filename": "CanvasTinter.js", "lineno": 252, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100033534", "name": "canUseMultiply", "type": "CallExpression", "value": "" } }, "description": "

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.

", "memberof": "PIXI.CanvasTinter", "type": { "names": [ "boolean" ] }, "name": "canUseMultiply", "longname": "PIXI.CanvasTinter.canUseMultiply", "kind": "member", "scope": "static", "___id": "T000002R003046", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.canUseMultiply", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * The tinting method that will be used.\n *\n * @memberof PIXI.CanvasTinter\n * @type {tintMethodFunctionType}\n */", "meta": { "range": [ 7423, 7436 ], "filename": "CanvasTinter.js", "lineno": 260, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100033537", "name": "tintMethod", "type": "Literal", "value": 0 } }, "description": "

The tinting method that will be used.

", "memberof": "PIXI.CanvasTinter", "type": { "names": [ "tintMethodFunctionType" ] }, "name": "tintMethod", "longname": "PIXI.CanvasTinter.tintMethod", "kind": "member", "scope": "static", "___id": "T000002R003047", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.tintMethod", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * The tintMethod type.\n *\n * @memberof PIXI.CanvasTinter\n * @callback tintMethodFunctionType\n * @param texture {PIXI.Texture} the texture to tint\n * @param color {number} the color to use to tint the sprite with\n * @param canvas {HTMLCanvasElement} the current canvas\n */", "meta": { "range": [ 7562, 7838 ], "filename": "CanvasTinter.js", "lineno": 265, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": {} }, "description": "

The tintMethod type.

", "memberof": "PIXI.CanvasTinter", "kind": "typedef", "name": "tintMethodFunctionType", "type": { "names": [ "function" ] }, "params": [ { "type": { "names": [ "PIXI.Texture" ] }, "description": "

the texture to tint

", "name": "texture" }, { "type": { "names": [ "number" ] }, "description": "

the color to use to tint the sprite with

", "name": "color" }, { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

the current canvas

", "name": "canvas" } ], "scope": "static", "longname": "PIXI.CanvasTinter.tintMethodFunctionType", "___id": "T000002R003049", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.tintMethodFunctionType", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Basically this method just needs a sprite and a color and tints the sprite with the given color.\n *\n * @memberof PIXI.CanvasTinter\n * @param {PIXI.Sprite} sprite - the sprite to tint\n * @param {number} color - the color to use to tint the sprite with\n * @return {HTMLCanvasElement} The tinted canvas\n */", "meta": { "range": [ 601, 1740 ], "filename": "CanvasTinter.js", "lineno": 19, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100107461", "name": "getTintedTexture", "type": "ArrowFunctionExpression" }, "vars": { "texture": "PIXI.CanvasTinter.getTintedTexture~texture", "color": "PIXI.CanvasTinter.getTintedTexture~color", "stringColor": "PIXI.CanvasTinter.getTintedTexture~stringColor", "texture.tintCache": "PIXI.CanvasTinter.getTintedTexture~texture.tintCache", "canvas": "PIXI.CanvasTinter.getTintedTexture~canvas", "tintImage": "PIXI.CanvasTinter.getTintedTexture~tintImage", "tintImage.src": "PIXI.CanvasTinter.getTintedTexture~tintImage.src", "texture.tintCache[undefined]": "PIXI.CanvasTinter.getTintedTexture~texture.tintCache[undefined]", "CanvasTinter.canvas": "PIXI.CanvasTinter.canvas" } }, "description": "

Basically this method just needs a sprite and a color and tints the sprite with the given color.

", "memberof": "PIXI.CanvasTinter", "params": [ { "type": { "names": [ "PIXI.Sprite" ] }, "description": "

the sprite to tint

", "name": "sprite" }, { "type": { "names": [ "number" ] }, "description": "

the color to use to tint the sprite with

", "name": "color" } ], "returns": [ { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

The tinted canvas

" } ], "name": "getTintedTexture", "longname": "PIXI.CanvasTinter.getTintedTexture", "kind": "function", "scope": "static", "___id": "T000002R009913", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.getTintedTexture", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Tint a texture using the 'multiply' operation.\n *\n * @memberof PIXI.CanvasTinter\n * @param {PIXI.Texture} texture - the texture to tint\n * @param {number} color - the color to use to tint the sprite with\n * @param {HTMLCanvasElement} canvas - the current canvas\n */", "meta": { "range": [ 2052, 3241 ], "filename": "CanvasTinter.js", "lineno": 67, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100107588", "name": "tintWithMultiply", "type": "ArrowFunctionExpression" }, "vars": { "context": "PIXI.CanvasTinter.tintWithMultiply~context", "crop": "PIXI.CanvasTinter.tintWithMultiply~crop", "resolution": "PIXI.CanvasTinter.tintWithMultiply~resolution", "crop.x": "PIXI.CanvasTinter.tintWithMultiply~crop.x", "crop.y": "PIXI.CanvasTinter.tintWithMultiply~crop.y", "crop.width": "PIXI.CanvasTinter.tintWithMultiply~crop.width", "crop.height": "PIXI.CanvasTinter.tintWithMultiply~crop.height", "canvas.width": "canvas.width", "canvas.height": "canvas.height", "context.fillStyle": "PIXI.CanvasTinter.tintWithMultiply~context.fillStyle", "context.globalCompositeOperation": "PIXI.CanvasTinter.tintWithMultiply~context.globalCompositeOperation" } }, "description": "

Tint a texture using the 'multiply' operation.

", "memberof": "PIXI.CanvasTinter", "params": [ { "type": { "names": [ "PIXI.Texture" ] }, "description": "

the texture to tint

", "name": "texture" }, { "type": { "names": [ "number" ] }, "description": "

the color to use to tint the sprite with

", "name": "color" }, { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

the current canvas

", "name": "canvas" } ], "name": "tintWithMultiply", "longname": "PIXI.CanvasTinter.tintWithMultiply", "kind": "function", "scope": "static", "___id": "T000002R009924", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.tintWithMultiply", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Tint a texture using the 'overlay' operation.\n *\n * @memberof PIXI.CanvasTinter\n * @param {PIXI.Texture} texture - the texture to tint\n * @param {number} color - the color to use to tint the sprite with\n * @param {HTMLCanvasElement} canvas - the current canvas\n */", "meta": { "range": [ 3552, 4537 ], "filename": "CanvasTinter.js", "lineno": 122, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100107775", "name": "tintWithOverlay", "type": "FunctionExpression" }, "vars": { "context": "PIXI.CanvasTinter.tintWithOverlay~context", "crop": "PIXI.CanvasTinter.tintWithOverlay~crop", "resolution": "PIXI.CanvasTinter.tintWithOverlay~resolution", "crop.x": "PIXI.CanvasTinter.tintWithOverlay~crop.x", "crop.y": "PIXI.CanvasTinter.tintWithOverlay~crop.y", "crop.width": "PIXI.CanvasTinter.tintWithOverlay~crop.width", "crop.height": "PIXI.CanvasTinter.tintWithOverlay~crop.height", "canvas.width": "canvas.width", "canvas.height": "canvas.height", "context.globalCompositeOperation": "PIXI.CanvasTinter.tintWithOverlay~context.globalCompositeOperation", "context.fillStyle": "PIXI.CanvasTinter.tintWithOverlay~context.fillStyle" } }, "description": "

Tint a texture using the 'overlay' operation.

", "memberof": "PIXI.CanvasTinter", "params": [ { "type": { "names": [ "PIXI.Texture" ] }, "description": "

the texture to tint

", "name": "texture" }, { "type": { "names": [ "number" ] }, "description": "

the color to use to tint the sprite with

", "name": "color" }, { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

the current canvas

", "name": "canvas" } ], "name": "tintWithOverlay", "longname": "PIXI.CanvasTinter.tintWithOverlay", "kind": "function", "scope": "static", "___id": "T000002R009937", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.tintWithOverlay", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Tint a texture pixel per pixel.\n *\n * @memberof PIXI.CanvasTinter\n * @param {PIXI.Texture} texture - the texture to tint\n * @param {number} color - the color to use to tint the sprite with\n * @param {HTMLCanvasElement} canvas - the current canvas\n */", "meta": { "range": [ 4834, 6041 ], "filename": "CanvasTinter.js", "lineno": 164, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100107932", "name": "tintWithPerPixel", "type": "ArrowFunctionExpression" }, "vars": { "context": "PIXI.CanvasTinter.tintWithPerPixel~context", "crop": "PIXI.CanvasTinter.tintWithPerPixel~crop", "resolution": "PIXI.CanvasTinter.tintWithPerPixel~resolution", "crop.x": "PIXI.CanvasTinter.tintWithPerPixel~crop.x", "crop.y": "PIXI.CanvasTinter.tintWithPerPixel~crop.y", "crop.width": "PIXI.CanvasTinter.tintWithPerPixel~crop.width", "crop.height": "PIXI.CanvasTinter.tintWithPerPixel~crop.height", "canvas.width": "canvas.width", "canvas.height": "canvas.height", "context.globalCompositeOperation": "PIXI.CanvasTinter.tintWithPerPixel~context.globalCompositeOperation", "rgbValues": "PIXI.CanvasTinter.tintWithPerPixel~rgbValues", "r": "PIXI.CanvasTinter.tintWithPerPixel~r", "g": "PIXI.CanvasTinter.tintWithPerPixel~g", "b": "PIXI.CanvasTinter.tintWithPerPixel~b", "pixelData": "PIXI.CanvasTinter.tintWithPerPixel~pixelData", "pixels": "PIXI.CanvasTinter.tintWithPerPixel~pixels", "i": "PIXI.CanvasTinter.tintWithPerPixel~i", "pixels[undefined]": "PIXI.CanvasTinter.tintWithPerPixel~pixels.undefined]" } }, "description": "

Tint a texture pixel per pixel.

", "memberof": "PIXI.CanvasTinter", "params": [ { "type": { "names": [ "PIXI.Texture" ] }, "description": "

the texture to tint

", "name": "texture" }, { "type": { "names": [ "number" ] }, "description": "

the color to use to tint the sprite with

", "name": "color" }, { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

the current canvas

", "name": "canvas" } ], "name": "tintWithPerPixel", "longname": "PIXI.CanvasTinter.tintWithPerPixel", "kind": "function", "scope": "static", "___id": "T000002R009950", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.tintWithPerPixel", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Rounds the specified color according to the CanvasTinter.cacheStepsPerColorChannel.\n *\n * @memberof PIXI.CanvasTinter\n * @param {number} color - the color to round, should be a hex color\n * @return {number} The rounded color.\n */", "meta": { "range": [ 6313, 6692 ], "filename": "CanvasTinter.js", "lineno": 217, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100108138", "name": "roundColor", "type": "ArrowFunctionExpression" }, "vars": { "step": "PIXI.CanvasTinter.roundColor~step", "rgbValues": "PIXI.CanvasTinter.roundColor~rgbValues", "rgbValues[0]": "PIXI.CanvasTinter.roundColor~rgbValues.0]", "rgbValues[1]": "PIXI.CanvasTinter.roundColor~rgbValues.1]", "rgbValues[2]": "PIXI.CanvasTinter.roundColor~rgbValues.2]" } }, "description": "

Rounds the specified color according to the CanvasTinter.cacheStepsPerColorChannel.

", "memberof": "PIXI.CanvasTinter", "params": [ { "type": { "names": [ "number" ] }, "description": "

the color to round, should be a hex color

", "name": "color" } ], "returns": [ { "type": { "names": [ "number" ] }, "description": "

The rounded color.

" } ], "name": "roundColor", "longname": "PIXI.CanvasTinter.roundColor", "kind": "function", "scope": "static", "___id": "T000002R009972", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.roundColor", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Number of steps which will be used as a cap when rounding colors.\n *\n * @memberof PIXI.CanvasTinter\n * @type {number}\n */", "meta": { "range": [ 6852, 6880 ], "filename": "CanvasTinter.js", "lineno": 236, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100108209", "name": "cacheStepsPerColorChannel", "type": "Literal", "value": 8 } }, "description": "

Number of steps which will be used as a cap when rounding colors.

", "memberof": "PIXI.CanvasTinter", "type": { "names": [ "number" ] }, "name": "cacheStepsPerColorChannel", "longname": "PIXI.CanvasTinter.cacheStepsPerColorChannel", "kind": "member", "scope": "static", "___id": "T000002R009978", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.cacheStepsPerColorChannel", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Tint cache boolean flag.\n *\n * @memberof PIXI.CanvasTinter\n * @type {boolean}\n */", "meta": { "range": [ 7000, 7025 ], "filename": "CanvasTinter.js", "lineno": 244, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100108211", "name": "convertTintToImage", "type": "Literal", "value": false } }, "description": "

Tint cache boolean flag.

", "memberof": "PIXI.CanvasTinter", "type": { "names": [ "boolean" ] }, "name": "convertTintToImage", "longname": "PIXI.CanvasTinter.convertTintToImage", "kind": "member", "scope": "static", "___id": "T000002R009979", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.convertTintToImage", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.\n *\n * @memberof PIXI.CanvasTinter\n * @type {boolean}\n */", "meta": { "range": [ 7232, 7275 ], "filename": "CanvasTinter.js", "lineno": 252, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100108213", "name": "canUseMultiply", "type": "CallExpression", "value": "" } }, "description": "

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.

", "memberof": "PIXI.CanvasTinter", "type": { "names": [ "boolean" ] }, "name": "canUseMultiply", "longname": "PIXI.CanvasTinter.canUseMultiply", "kind": "member", "scope": "static", "___id": "T000002R009980", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.canUseMultiply", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * The tinting method that will be used.\n *\n * @memberof PIXI.CanvasTinter\n * @type {tintMethodFunctionType}\n */", "meta": { "range": [ 7423, 7436 ], "filename": "CanvasTinter.js", "lineno": 260, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": { "id": "astnode100108216", "name": "tintMethod", "type": "Literal", "value": 0 } }, "description": "

The tinting method that will be used.

", "memberof": "PIXI.CanvasTinter", "type": { "names": [ "tintMethodFunctionType" ] }, "name": "tintMethod", "longname": "PIXI.CanvasTinter.tintMethod", "kind": "member", "scope": "static", "___id": "T000002R009981", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.tintMethod", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }, { "comment": "/**\n * The tintMethod type.\n *\n * @memberof PIXI.CanvasTinter\n * @callback tintMethodFunctionType\n * @param texture {PIXI.Texture} the texture to tint\n * @param color {number} the color to use to tint the sprite with\n * @param canvas {HTMLCanvasElement} the current canvas\n */", "meta": { "range": [ 7562, 7838 ], "filename": "CanvasTinter.js", "lineno": 265, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\sprites\\canvas", "code": {} }, "description": "

The tintMethod type.

", "memberof": "PIXI.CanvasTinter", "kind": "typedef", "name": "tintMethodFunctionType", "type": { "names": [ "function" ] }, "params": [ { "type": { "names": [ "PIXI.Texture" ] }, "description": "

the texture to tint

", "name": "texture" }, { "type": { "names": [ "number" ] }, "description": "

the color to use to tint the sprite with

", "name": "color" }, { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

the current canvas

", "name": "canvas" } ], "scope": "static", "longname": "PIXI.CanvasTinter.tintMethodFunctionType", "___id": "T000002R009983", "___s": true, "skip": true, "slug": "PIXI.CanvasTinter.tintMethodFunctionType", "filepath": "core\\sprites\\canvas\\CanvasTinter.js" } ], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [], "filepath": "core\\sprites\\canvas\\CanvasTinter.js" }