Class cc.Texture2DCanvas

Class Summary
Constructor Attributes Constructor Name and Description
 

This class allows to easily create Canvas 2D textures from images, text or raw data.

Class Detail

cc.Texture2DCanvas()

This class allows to easily create Canvas 2D textures from images, text or raw data.
The created cc.Texture2D object will always have power-of-two dimensions.
Depending on how you create the cc.Texture2D object, the actual image area of the texture might be smaller than the texture dimensions
i.e. "contentSize" != (pixelsWide, pixelsHigh) and (maxS, maxT) != (1.0, 1.0).
Be aware that the content of the generated textures will be upside-down!