PIXI. CanvasBuffer

new CanvasBuffer(width, height)

Creates a Canvas element of the given size.

Parameters:
Name Type Description
width Number

the width for the newly created canvas

height Number

the height for the newly created canvas

Source - pixi/renderers/canvas/utils/CanvasBuffer.js, line 5

Members

canvas :HTMLCanvasElement

The Canvas object that belongs to this CanvasBuffer.

Source - pixi/renderers/canvas/utils/CanvasBuffer.js, line 31

context :CanvasRenderingContext2D

A CanvasRenderingContext2D object representing a two-dimensional rendering context.

Source - pixi/renderers/canvas/utils/CanvasBuffer.js, line 39

height :Number

The height of the Canvas in pixels.

Source - pixi/renderers/canvas/utils/CanvasBuffer.js, line 23

width :Number

The width of the Canvas in pixels.

Source - pixi/renderers/canvas/utils/CanvasBuffer.js, line 15

Methods

destroy()

Frees the canvas up for use again.

Source - pixi/renderers/canvas/utils/CanvasBuffer.js, line 78

resize(width, height)

Resizes the canvas to the specified width and height.

Parameters:
Name Type Description
width Number

the new width of the canvas

height Number

the new height of the canvas

Source - pixi/renderers/canvas/utils/CanvasBuffer.js, line 65
Phaser Copyright © 2012-2015 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.2 on Thu Feb 18 2016 14:41:09 GMT+0000 (GMT Standard Time) using the DocStrap template.

快捷菜单

注意:只有登录才能全文翻译,每个新用户赠送300会员币。
赚取方法:文章评论+1000,分享网站截图给站长+3000,另充10元+100万会员币
支持一下记得截图给站长!

VIP限时免费阅读!登录可得1万币尽情中文阅读!


记得CTRL+D收藏!
站长微信:
支持自学php网
如有问题,记得强刷一下.

  • canvas :HTMLCanvasElement - 属性
  • context :CanvasRenderingContext2D - 属性
  • height :Number - 属性
  • width :Number - 属性
  • destroy() - 方法
  • resize(width, height) - 方法