Packagefeathers.display
Classpublic class TiledImage
InheritanceTiledImage Inheritance starling.display.Sprite
Implements IValidating

Tiles a texture to fill the specified bounds.



Public Properties
 PropertyDefined By
  color : uint
The color value to pass to the tiled images.
TiledImage
  depth : int
[read-only] The component's depth in the display list, relative to the stage.
TiledImage
  smoothing : String
The smoothing value to pass to the tiled images.
TiledImage
  texture : Texture
The texture to tile.
TiledImage
  textureScale : Number
Scales the texture dimensions during measurement.
TiledImage
  useSeparateBatch : Boolean
Determines if the tiled images are batched normally by Starling or if they're batched separately.
TiledImage
Public Methods
 MethodDefined By
  
TiledImage(texture:Texture, textureScale:Number = 1)
Constructor.
TiledImage
  
setSize(width:Number, height:Number):void
Set both the width and height in one call.
TiledImage
  
validate():void
Immediately validates the display object, if it is invalid.
TiledImage
Property Detail
colorproperty
color:uint

The color value to pass to the tiled images.

In the following example, the color is changed:

         image.color = 0xff00ff;

The default value is 0xffffff.


Implementation
    public function get color():uint
    public function set color(value:uint):void
depthproperty 
depth:int  [read-only]

The component's depth in the display list, relative to the stage. If the component isn't on the stage, its depth will be -1.

Used by the validation system to validate components from the top down

.


Implementation
    public function get depth():int
smoothingproperty 
smoothing:String

The smoothing value to pass to the tiled images.

In the following example, the smoothing is changed:

         image.smoothing = TextureSmoothing.NONE;

The default value is starling.textures.TextureSmoothing.BILINEAR.


Implementation
    public function get smoothing():String
    public function set smoothing(value:String):void

See also

textureproperty 
texture:Texture

The texture to tile.

In the following example, the texture is changed:

         image.texture = Texture.fromBitmapData( bitmapData );


Implementation
    public function get texture():Texture
    public function set texture(value:Texture):void
textureScaleproperty 
textureScale:Number

Scales the texture dimensions during measurement. Useful for UI that should scale based on screen density or resolution.

In the following example, the texture scale is changed:

         image.textureScale = 2;

The default value is 1.


Implementation
    public function get textureScale():Number
    public function set textureScale(value:Number):void
useSeparateBatchproperty 
useSeparateBatch:Boolean

Determines if the tiled images are batched normally by Starling or if they're batched separately.

In the following example, separate batching is disabled:

         image.useSeparateBatch = false;

The default value is true.


Implementation
    public function get useSeparateBatch():Boolean
    public function set useSeparateBatch(value:Boolean):void
Constructor Detail
TiledImage()Constructor
public function TiledImage(texture:Texture, textureScale:Number = 1)

Constructor.

Parameters
texture:Texture
 
textureScale:Number (default = 1)
Method Detail
setSize()method
public function setSize(width:Number, height:Number):void

Set both the width and height in one call.

Parameters

width:Number
 
height:Number

validate()method 
public function validate():void

Immediately validates the display object, if it is invalid. The validation system exists to postpone updating a display object after properties are changed until until the last possible moment the display object is rendered. This allows multiple properties to be changed at a time without requiring a full update every time.