Packagestarling.textures
Classpublic class ConcreteTexture
InheritanceConcreteTexture Inheritance Texture Inheritance Object

A ConcreteTexture wraps a Stage3D texture object, storing the properties of the texture.



Public Properties
 PropertyDefined 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
 Inheritedframe : 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
 Inheritedrepeat : 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
Public Methods
 MethodDefined 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
 Inherited
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
 Inherited
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
 Inherited
fromAtfData(data:ByteArray, scale:Number = 1, useMipMaps:Boolean = true, loadAsync:Function = null):Texture
[static] Creates a texture from the compressed ATF format.
Texture
 Inherited
fromBitmap(data:Bitmap, generateMipMaps:Boolean = true, optimizeForRenderToTexture:Boolean = false, scale:Number = 1):Texture
[static] Creates a texture object from a bitmap.
Texture
 Inherited
fromBitmapData(data:BitmapData, generateMipMaps:Boolean = true, optimizeForRenderToTexture:Boolean = false, scale:Number = 1):Texture
[static] Creates a texture from bitmap data.
Texture
 Inherited
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
 Inherited
fromTexture(texture:Texture, region:Rectangle = null, frame:Rectangle = null):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
Property Detail
baseproperty
base:TextureBase  [read-only] [override]

The Stage3D texture object the texture is based on.


Implementation
    public function get base():TextureBase
formatproperty 
format:String  [read-only] [override]

The Context3DTextureFormat of the underlying texture data.


Implementation
    public function get format():String
heightproperty 
height:Number  [read-only] [override]

The height of the texture in points.


Implementation
    public function get height():Number
mipMappingproperty 
mipMapping:Boolean  [read-only] [override]

Indicates if the texture contains mip maps.


Implementation
    public function get mipMapping():Boolean
nativeHeightproperty 
nativeHeight:Number  [read-only] [override]

The height of the texture in pixels (without scale adjustment).


Implementation
    public function get nativeHeight():Number
nativeWidthproperty 
nativeWidth:Number  [read-only] [override]

The width of the texture in pixels (without scale adjustment).


Implementation
    public function get nativeWidth():Number
optimizedForRenderTextureproperty 
optimizedForRenderTexture:Boolean  [read-only]

Indicates if the base texture was optimized for being used in a render texture.


Implementation
    public function get optimizedForRenderTexture():Boolean
premultipliedAlphaproperty 
premultipliedAlpha:Boolean  [read-only] [override]

Indicates if the alpha values are premultiplied into the RGB values.


Implementation
    public function get premultipliedAlpha():Boolean
rootproperty 
root:ConcreteTexture  [read-only] [override]

The concrete (power-of-two) texture the texture is based on.


Implementation
    public function get root():ConcreteTexture
scaleproperty 
scale:Number  [read-only] [override]

The scale factor, which influences width and height properties.


Implementation
    public function get scale():Number
widthproperty 
width:Number  [read-only] [override]

The width of the texture in points.


Implementation
    public function get width():Number
Constructor Detail
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.

Parameters
base:TextureBase
 
format:String
 
width:int
 
height:int
 
mipMapping:Boolean
 
premultipliedAlpha:Boolean
 
optimizedForRenderTexture:Boolean (default = false)
 
scale:Number (default = 1)
Method Detail
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