Package | starling.textures |
Class | public class ConcreteTexture |
Inheritance | ConcreteTexture ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
base : TextureBase [override] [read-only] The Stage3D texture object the texture is based on. | ConcreteTexture | ||
format : String [override] [read-only] The Context3DTextureFormat of the underlying texture data. | ConcreteTexture | ||
![]() | frame : Rectangle [read-only] The texture frame (see class description). | Texture | |
height : Number [override] [read-only] The height of the texture in points. | ConcreteTexture | ||
mipMapping : Boolean [override] [read-only] Indicates if the texture contains mip maps. | ConcreteTexture | ||
nativeHeight : Number [override] [read-only] The height of the texture in pixels (without scale adjustment). | ConcreteTexture | ||
nativeWidth : Number [override] [read-only] The width of the texture in pixels (without scale adjustment). | ConcreteTexture | ||
optimizedForRenderTexture : Boolean [read-only] Indicates if the base texture was optimized for being used in a render texture. | ConcreteTexture | ||
premultipliedAlpha : Boolean [override] [read-only] Indicates if the alpha values are premultiplied into the RGB values. | ConcreteTexture | ||
![]() | repeat : Boolean Indicates if the texture should repeat like a wallpaper or stretch the outermost pixels. | Texture | |
root : ConcreteTexture [override] [read-only] The concrete (power-of-two) texture the texture is based on. | ConcreteTexture | ||
scale : Number [override] [read-only] The scale factor, which influences width and height properties. | ConcreteTexture | ||
width : Number [override] [read-only] The width of the texture in points. | ConcreteTexture |
Method | Defined By | ||
---|---|---|---|
ConcreteTexture(base:TextureBase, format:String, width:int, height:int, mipMapping:Boolean, premultipliedAlpha:Boolean, optimizedForRenderTexture:Boolean = false, scale:Number = 1) Creates a ConcreteTexture object from a TextureBase, storing information about size,
mip-mapping, and if the channels contain premultiplied alpha values. | ConcreteTexture | ||
![]() | adjustVertexData(vertexData:VertexData, vertexID:int, count:int):void Converts texture coordinates and vertex positions of raw vertex data into the format
required for rendering. | Texture | |
dispose():void [override] Disposes the TextureBase object. | ConcreteTexture | ||
![]() | empty(width:int = 64, height:int = 64, premultipliedAlpha:Boolean = false, optimizeForRenderToTexture:Boolean = true, scale:Number = -1):Texture [static] Creates an empty texture of a certain size. | Texture | |
![]() | fromAtfData(data:ByteArray, scale:Number = 1, useMipMaps:Boolean = true, loadAsync:Function = null):Texture [static] Creates a texture from the compressed ATF format. | Texture | |
![]() | fromBitmap(data:Bitmap, generateMipMaps:Boolean = true, optimizeForRenderToTexture:Boolean = false, scale:Number = 1):Texture [static] Creates a texture object from a bitmap. | Texture | |
![]() | fromBitmapData(data:BitmapData, generateMipMaps:Boolean = true, optimizeForRenderToTexture:Boolean = false, scale:Number = 1):Texture [static] Creates a texture from bitmap data. | Texture | |
![]() | fromColor(width:int, height:int, color:uint = 0xffffffff, optimizeForRenderToTexture:Boolean = false, scale:Number = -1):Texture [static] Creates a texture with a certain size and color. | Texture | |
![]() | [static] Creates a texture that contains a region (in pixels) of another texture. | Texture | |
restoreOnLostContext(data:Object):void Instructs this instance to restore its base texture when the context is lost. | ConcreteTexture |
base | property |
base:TextureBase
[read-only] [override] The Stage3D texture object the texture is based on.
public function get base():TextureBase
format | property |
format:String
[read-only] [override] The Context3DTextureFormat
of the underlying texture data.
public function get format():String
height | property |
height:Number
[read-only] [override] The height of the texture in points.
public function get height():Number
mipMapping | property |
mipMapping:Boolean
[read-only] [override] Indicates if the texture contains mip maps.
public function get mipMapping():Boolean
nativeHeight | property |
nativeHeight:Number
[read-only] [override] The height of the texture in pixels (without scale adjustment).
public function get nativeHeight():Number
nativeWidth | property |
nativeWidth:Number
[read-only] [override] The width of the texture in pixels (without scale adjustment).
public function get nativeWidth():Number
optimizedForRenderTexture | property |
optimizedForRenderTexture:Boolean
[read-only] Indicates if the base texture was optimized for being used in a render texture.
public function get optimizedForRenderTexture():Boolean
premultipliedAlpha | property |
premultipliedAlpha:Boolean
[read-only] [override] Indicates if the alpha values are premultiplied into the RGB values.
public function get premultipliedAlpha():Boolean
root | property |
root:ConcreteTexture
[read-only] [override] The concrete (power-of-two) texture the texture is based on.
public function get root():ConcreteTexture
scale | property |
scale:Number
[read-only] [override] The scale factor, which influences width and height properties.
public function get scale():Number
width | property |
width:Number
[read-only] [override] The width of the texture in points.
public function get width():Number
ConcreteTexture | () | Constructor |
public function ConcreteTexture(base:TextureBase, format:String, width:int, height:int, mipMapping:Boolean, premultipliedAlpha:Boolean, optimizedForRenderTexture:Boolean = false, scale:Number = 1)
Creates a ConcreteTexture object from a TextureBase, storing information about size, mip-mapping, and if the channels contain premultiplied alpha values.
Parametersbase:TextureBase | |
format:String | |
width:int | |
height:int | |
mipMapping:Boolean | |
premultipliedAlpha:Boolean | |
optimizedForRenderTexture:Boolean (default = false )
| |
scale:Number (default = 1 )
|
dispose | () | method |
override public function dispose():void
Disposes the TextureBase object.
restoreOnLostContext | () | method |
public function restoreOnLostContext(data:Object):void
Instructs this instance to restore its base texture when the context is lost. 'data' can be either BitmapData or a ByteArray with ATF data.
Parameters
data:Object |