Home

class: CanvasGraphicsRenderer


Renderer dedicated to drawing and batching graphics objects.

Methods summary


Public methods
public render(graphics: PIXI.Graphics): void
private updateGraphicsTint(graphics: PIXI.Graphics): void
public renderPolygon(points: Array., close: boolean, context: CanvasRenderingContext2D): void
public destroy(): void
public render(graphics: PIXI.Graphics): void
private updateGraphicsTint(graphics: PIXI.Graphics): void
public renderPolygon(points: Array., close: boolean, context: CanvasRenderingContext2D): void
public destroy(): void

Methods


render(graphics: PIXI.Graphics): void

Renders a Graphics object to a canvas.

Params:

Name Type Attribute Description
graphics

the actual graphics object to render

Returns:

void


updateGraphicsTint(graphics: PIXI.Graphics): void

Updates the tint of a graphics object

Params:

Name Type Attribute Description
graphics

the graphics that will have its tint updated

Returns:

void


renderPolygon(points: Array., close: boolean, context: CanvasRenderingContext2D): void

Renders a polygon.

Params:

Name Type Attribute Description
points

The points to render

close

Should the polygon be closed

context

The rendering context to use

Returns:

void


destroy(): void

destroy graphics object

Returns:

void


render(graphics: PIXI.Graphics): void

Renders a Graphics object to a canvas.

Params:

Name Type Attribute Description
graphics

the actual graphics object to render

Returns:

void


updateGraphicsTint(graphics: PIXI.Graphics): void

Updates the tint of a graphics object

Params:

Name Type Attribute Description
graphics

the graphics that will have its tint updated

Returns:

void


renderPolygon(points: Array., close: boolean, context: CanvasRenderingContext2D): void

Renders a polygon.

Params:

Name Type Attribute Description
points

The points to render

close

Should the polygon be closed

context

The rendering context to use

Returns:

void


destroy(): void

destroy graphics object

Returns:

void


  {
    "comment": "/**\n * Renderer dedicated to drawing and batching graphics objects.\n *\n * @class\n * @private\n * @memberof PIXI\n */",
    "meta": {
        "range": [
            733,
            10124
        ],
        "filename": "CanvasGraphicsRenderer.js",
        "lineno": 25,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\graphics\\canvas",
        "code": {
            "id": "astnode100007559",
            "name": "CanvasGraphicsRenderer",
            "type": "ClassDeclaration",
            "paramnames": [
                "renderer"
            ]
        }
    },
    "classdesc": "

Renderer dedicated to drawing and batching graphics objects.

", "kind": "class", "access": "private", "memberof": "PIXI", "name": "CanvasGraphicsRenderer", "longname": "PIXI.CanvasGraphicsRenderer", "scope": "static", "params": [ { "type": { "names": [ "PIXI.CanvasRenderer" ] }, "description": "

The current PIXI renderer.

", "name": "renderer" } ], "___id": "T000002R000756", "___s": true, "$methods": [ { "comment": "/**\n * Renders a Graphics object to a canvas.\n *\n * @param {PIXI.Graphics} graphics - the actual graphics object to render\n */", "meta": { "range": [ 1078, 8224 ], "filename": "CanvasGraphicsRenderer.js", "lineno": 40, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\graphics\\canvas", "code": { "id": "astnode100007573", "name": "CanvasGraphicsRenderer#render", "type": "MethodDefinition", "paramnames": [ "graphics" ] }, "vars": { "": null } }, "description": "

Renders a Graphics object to a canvas.

", "params": [ { "type": { "names": [ "PIXI.Graphics" ] }, "description": "

the actual graphics object to render

", "name": "graphics" } ], "name": "render", "longname": "PIXI.CanvasGraphicsRenderer#render", "kind": "function", "memberof": "PIXI.CanvasGraphicsRenderer", "scope": "instance", "___id": "T000002R000759", "___s": true, "skip": true, "slug": "PIXI.CanvasGraphicsRendererrender", "filepath": "core\\graphics\\canvas\\CanvasGraphicsRenderer.js" }, { "comment": "/**\n * Updates the tint of a graphics object\n *\n * @private\n * @param {PIXI.Graphics} graphics - the graphics that will have its tint updated\n */", "meta": { "range": [ 8400, 9451 ], "filename": "CanvasGraphicsRenderer.js", "lineno": 228, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\graphics\\canvas", "code": { "id": "astnode100008657", "name": "CanvasGraphicsRenderer#updateGraphicsTint", "type": "MethodDefinition", "paramnames": [ "graphics" ] }, "vars": { "": null } }, "description": "

Updates the tint of a graphics object

", "access": "private", "params": [ { "type": { "names": [ "PIXI.Graphics" ] }, "description": "

the graphics that will have its tint updated

", "name": "graphics" } ], "name": "updateGraphicsTint", "longname": "PIXI.CanvasGraphicsRenderer#updateGraphicsTint", "kind": "function", "memberof": "PIXI.CanvasGraphicsRenderer", "scope": "instance", "___id": "T000002R000812", "___s": true, "skip": true, "slug": "PIXI.CanvasGraphicsRendererupdateGraphicsTint", "filepath": "core\\graphics\\canvas\\CanvasGraphicsRenderer.js" }, { "comment": "/**\n * Renders a polygon.\n *\n * @param {PIXI.Point[]} points - The points to render\n * @param {boolean} close - Should the polygon be closed\n * @param {CanvasRenderingContext2D} context - The rendering context to use\n */", "meta": { "range": [ 9706, 10011 ], "filename": "CanvasGraphicsRenderer.js", "lineno": 265, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\graphics\\canvas", "code": { "id": "astnode100008827", "name": "CanvasGraphicsRenderer#renderPolygon", "type": "MethodDefinition", "paramnames": [ "points", "close", "context" ] }, "vars": { "": null } }, "description": "

Renders a polygon.

", "params": [ { "type": { "names": [ "Array." ] }, "description": "

The points to render

", "name": "points" }, { "type": { "names": [ "boolean" ] }, "description": "

Should the polygon be closed

", "name": "close" }, { "type": { "names": [ "CanvasRenderingContext2D" ] }, "description": "

The rendering context to use

", "name": "context" } ], "name": "renderPolygon", "longname": "PIXI.CanvasGraphicsRenderer#renderPolygon", "kind": "function", "memberof": "PIXI.CanvasGraphicsRenderer", "scope": "instance", "___id": "T000002R000823", "___s": true, "skip": true, "slug": "PIXI.CanvasGraphicsRendererrenderPolygon", "filepath": "core\\graphics\\canvas\\CanvasGraphicsRenderer.js" }, { "comment": "/**\n * destroy graphics object\n *\n */", "meta": { "range": [ 10071, 10122 ], "filename": "CanvasGraphicsRenderer.js", "lineno": 284, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\graphics\\canvas", "code": { "id": "astnode100008885", "name": "CanvasGraphicsRenderer#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

destroy graphics object

", "name": "destroy", "longname": "PIXI.CanvasGraphicsRenderer#destroy", "kind": "function", "memberof": "PIXI.CanvasGraphicsRenderer", "scope": "instance", "params": [], "___id": "T000002R000825", "___s": true, "skip": true, "slug": "PIXI.CanvasGraphicsRendererdestroy", "filepath": "core\\graphics\\canvas\\CanvasGraphicsRenderer.js" }, { "comment": "/**\n * Renders a Graphics object to a canvas.\n *\n * @param {PIXI.Graphics} graphics - the actual graphics object to render\n */", "meta": { "range": [ 1078, 8224 ], "filename": "CanvasGraphicsRenderer.js", "lineno": 40, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\graphics\\canvas", "code": { "id": "astnode100082252", "name": "CanvasGraphicsRenderer#render", "type": "MethodDefinition", "paramnames": [ "graphics" ] }, "vars": { "": null } }, "description": "

Renders a Graphics object to a canvas.

", "params": [ { "type": { "names": [ "PIXI.Graphics" ] }, "description": "

the actual graphics object to render

", "name": "graphics" } ], "name": "render", "longname": "PIXI.CanvasGraphicsRenderer#render", "kind": "function", "memberof": "PIXI.CanvasGraphicsRenderer", "scope": "instance", "___id": "T000002R007693", "___s": true, "skip": true, "slug": "PIXI.CanvasGraphicsRendererrender", "filepath": "core\\graphics\\canvas\\CanvasGraphicsRenderer.js" }, { "comment": "/**\n * Updates the tint of a graphics object\n *\n * @private\n * @param {PIXI.Graphics} graphics - the graphics that will have its tint updated\n */", "meta": { "range": [ 8400, 9451 ], "filename": "CanvasGraphicsRenderer.js", "lineno": 228, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\graphics\\canvas", "code": { "id": "astnode100083336", "name": "CanvasGraphicsRenderer#updateGraphicsTint", "type": "MethodDefinition", "paramnames": [ "graphics" ] }, "vars": { "": null } }, "description": "

Updates the tint of a graphics object

", "access": "private", "params": [ { "type": { "names": [ "PIXI.Graphics" ] }, "description": "

the graphics that will have its tint updated

", "name": "graphics" } ], "name": "updateGraphicsTint", "longname": "PIXI.CanvasGraphicsRenderer#updateGraphicsTint", "kind": "function", "memberof": "PIXI.CanvasGraphicsRenderer", "scope": "instance", "___id": "T000002R007746", "___s": true, "skip": true, "slug": "PIXI.CanvasGraphicsRendererupdateGraphicsTint", "filepath": "core\\graphics\\canvas\\CanvasGraphicsRenderer.js" }, { "comment": "/**\n * Renders a polygon.\n *\n * @param {PIXI.Point[]} points - The points to render\n * @param {boolean} close - Should the polygon be closed\n * @param {CanvasRenderingContext2D} context - The rendering context to use\n */", "meta": { "range": [ 9706, 10011 ], "filename": "CanvasGraphicsRenderer.js", "lineno": 265, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\graphics\\canvas", "code": { "id": "astnode100083506", "name": "CanvasGraphicsRenderer#renderPolygon", "type": "MethodDefinition", "paramnames": [ "points", "close", "context" ] }, "vars": { "": null } }, "description": "

Renders a polygon.

", "params": [ { "type": { "names": [ "Array." ] }, "description": "

The points to render

", "name": "points" }, { "type": { "names": [ "boolean" ] }, "description": "

Should the polygon be closed

", "name": "close" }, { "type": { "names": [ "CanvasRenderingContext2D" ] }, "description": "

The rendering context to use

", "name": "context" } ], "name": "renderPolygon", "longname": "PIXI.CanvasGraphicsRenderer#renderPolygon", "kind": "function", "memberof": "PIXI.CanvasGraphicsRenderer", "scope": "instance", "___id": "T000002R007757", "___s": true, "skip": true, "slug": "PIXI.CanvasGraphicsRendererrenderPolygon", "filepath": "core\\graphics\\canvas\\CanvasGraphicsRenderer.js" }, { "comment": "/**\n * destroy graphics object\n *\n */", "meta": { "range": [ 10071, 10122 ], "filename": "CanvasGraphicsRenderer.js", "lineno": 284, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\graphics\\canvas", "code": { "id": "astnode100083564", "name": "CanvasGraphicsRenderer#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

destroy graphics object

", "name": "destroy", "longname": "PIXI.CanvasGraphicsRenderer#destroy", "kind": "function", "memberof": "PIXI.CanvasGraphicsRenderer", "scope": "instance", "params": [], "___id": "T000002R007759", "___s": true, "skip": true, "slug": "PIXI.CanvasGraphicsRendererdestroy", "filepath": "core\\graphics\\canvas\\CanvasGraphicsRenderer.js" } ], "$attributes": [], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [], "filepath": "core\\graphics\\canvas\\CanvasGraphicsRenderer.js" }