Packagefeathers.textures
Classpublic final class Scale3Textures
InheritanceScale3Textures Inheritance Object

Slices a Starling Texture into three regions to be used by Scale3Image.

See also

feathers.display.Scale3Image


Public Properties
 PropertyDefined By
  direction : String
[read-only] The direction of the sub-texture layout.
Scale3Textures
  first : Texture
[read-only] The texture for the first region.
Scale3Textures
  firstRegionSize : Number
[read-only] The size of the first region, in pixels.
Scale3Textures
  second : Texture
[read-only] The texture for the second region.
Scale3Textures
  secondRegionSize : Number
[read-only] The size of the second region, in pixels.
Scale3Textures
  texture : Texture
[read-only] The original texture.
Scale3Textures
  third : Texture
[read-only] The texture for the third region.
Scale3Textures
Public Methods
 MethodDefined By
  
Scale3Textures(texture:Texture, firstRegionSize:Number, secondRegionSize:Number, direction:String)
Constructor.
Scale3Textures
Public Constants
 ConstantDefined By
  DIRECTION_HORIZONTAL : String = horizontal
[static] If the direction is horizontal, the layout will start on the left and continue to the right.
Scale3Textures
  DIRECTION_VERTICAL : String = vertical
[static] If the direction is vertical, the layout will start on the top and continue to the bottom.
Scale3Textures
Property Detail
directionproperty
direction:String  [read-only]

The direction of the sub-texture layout.

The default value is Scale3Textures.DIRECTION_HORIZONTAL.


Implementation
    public function get direction():String

See also

firstproperty 
first:Texture  [read-only]

The texture for the first region.


Implementation
    public function get first():Texture
firstRegionSizeproperty 
firstRegionSize:Number  [read-only]

The size of the first region, in pixels.


Implementation
    public function get firstRegionSize():Number
secondproperty 
second:Texture  [read-only]

The texture for the second region.


Implementation
    public function get second():Texture
secondRegionSizeproperty 
secondRegionSize:Number  [read-only]

The size of the second region, in pixels.


Implementation
    public function get secondRegionSize():Number
textureproperty 
texture:Texture  [read-only]

The original texture.


Implementation
    public function get texture():Texture
thirdproperty 
third:Texture  [read-only]

The texture for the third region.


Implementation
    public function get third():Texture
Constructor Detail
Scale3Textures()Constructor
public function Scale3Textures(texture:Texture, firstRegionSize:Number, secondRegionSize:Number, direction:String)

Constructor.

Parameters
texture:Texture — A Starling Texture to slice up into three regions. It is recommended to turn of mip-maps for best rendering results.
 
firstRegionSize:Number — The size, in pixels, of the first of the three regions. This value should be based on the original texture dimensions, with no adjustments for scale factor.
 
secondRegionSize:Number — The size, in pixels, of the second of the three regions. This value should be based on the original texture dimensions, with no adjustments for scale factor.
 
direction:String (default = NaN) — Indicates if the regions should be positioned horizontally or vertically.
Constant Detail
DIRECTION_HORIZONTALConstant
public static const DIRECTION_HORIZONTAL:String = horizontal

If the direction is horizontal, the layout will start on the left and continue to the right.

DIRECTION_VERTICALConstant 
public static const DIRECTION_VERTICAL:String = vertical

If the direction is vertical, the layout will start on the top and continue to the bottom.