Packagecom.ghostwire.ui.core
Classpublic class uiBitmapImage
InheritanceuiBitmapImage Inheritance flash.display.Bitmap
SubclassesuiFocusRect

The uiBitmapImage class implements the ability to scale bitmap images intelligently. It is a core asset behind the Aspire UI Framework's skinning engine and works hand-in-hand with the uiSkins class.

You do not need to access this class in your applications; it is used only in component implementations.

~ This class is available in Aspire UI Components Lite Edition ~



Public Properties
 PropertyDefined by
  edge : uiEdge
Indicates the thickness of the edges of the bitmap that should not be stretched when the bitmap is scaled.
uiBitmapImage
  midX : int
Indicates the width of the middle portion that should not be stretched when the uiBitmapImage instance is scaled horizontally.
uiBitmapImage
  midY : int
Indicates the height of the middle portion that should not be stretched when the uiBitmapImage instance is scaled vertically.
uiBitmapImage
  repeatX : Boolean
Indicates whether the scaling portion of the bitmap should repeat across the X-axis (horizontally) instead of stretching linearly.
uiBitmapImage
  repeatY : Boolean
Indicates whether the scaling portion of the bitmap should repeat across the Y-axis (vertically) instead of stretching linearly.
uiBitmapImage
Public Methods
 MethodDefined by
  
uiBitmapImage(bitmapData:BitmapData = null)
Constructor - creates a new uiBitmapImage instance.
uiBitmapImage
Public Constants
 ConstantDefined by
  sizeLimit : int = 2880
[static] Indicates the maximum valid value for width and height.
uiBitmapImage
Property detail
edgeproperty
public var edge:uiEdge

Indicates the thickness of the edges of the bitmap that should not be stretched when the bitmap is scaled.

This property is automatically set when the uiBitmapImage object is requested using the uiSkins.manager.request() method. The value depends on what is specified in the rules.xml file. If nothing is specified, a default uiEdge of 3 pixel thickness on all sides is used.

Consider the following entry in the rules.xml file:

 <uiSliderThumb edge="4,5,7,6" /> 
The uiSliderThumb skin will have an edge of (4,5,7,6) - (top, right, bottom, left) respectively.

Setting this property to null removes the intelligent scaling capability.

midXproperty 
public var midX:int

Indicates the width of the middle portion that should not be stretched when the uiBitmapImage instance is scaled horizontally.

This property is automatically set when the uiBitmapImage object is requested using the uiSkins.manager.request() method. The value depends on what is specified in the rules.xml file. This setting is optional. If not defined, the image will be scaled linearly instead of retaining an "original" middle portion.

Consider the following entry in the rules.xml file:

 <uiScrollBarThumb edge="3,3,3,3,8,8" /> 
The uiScrollBarThumb skin will have midX of 8 (5th number).

Note that this middle portion will not show if the size of the uiBitmapImage instance is too small.

midYproperty 
public var midY:int

Indicates the height of the middle portion that should not be stretched when the uiBitmapImage instance is scaled vertically.

This property is automatically set when the uiBitmapImage object is requested using the uiSkins.manager.request() method. The value depends on what is specified in the rules.xml file. This setting is optional. If not defined, the image will be scaled linearly instead of retaining an "original" middle portion.

Consider the following entry in the rules.xml file:

 <uiScrollBarThumb edge="3,3,3,3,8,8" /> 
The uiScrollBarThumb skin will have midY of 8 (6th number).

Note that this middle portion will not show if the size of the uiBitmapImage instance is too small.

repeatXproperty 
public var repeatX:Boolean

Indicates whether the scaling portion of the bitmap should repeat across the X-axis (horizontally) instead of stretching linearly.

This property is automatically set when the uiBitmapImage object is requested using the uiSkins.manager.request() method. The value depends on what is specified in the rules.xml file. If nothing is specified, a default value of false is used.

Consider the following entry in the rules.xml file:

 <uiSpecialSkin repeat="x" /> 
The uiSpecialSkin skin will have repeatX set to true.

Consider the following entry in the rules.xml file:

 <uiSpecialSkin repeat="xy" /> 
The uiSpecialSkin skin will have both repeatX and repeatY set to true.

The default value is false.

repeatYproperty 
public var repeatY:Boolean

Indicates whether the scaling portion of the bitmap should repeat across the Y-axis (vertically) instead of stretching linearly.

This property is automatically set when the uiBitmapImage object is requested using the uiSkins.manager.request() method. The value depends on what is specified in the rules.xml file. If nothing is specified, a default value of false is used.

Consider the following entry in the rules.xml file:

 <uiSpecialSkin repeat="y" /> 
The uiSpecialSkin skin will have repeatY set to true.

Consider the following entry in the rules.xml file:

 <uiSpecialSkin repeat="xy" /> 
The uiSpecialSkin skin will have both repeatX and repeatY set to true.

The default value is false.

Constructor detail
uiBitmapImage()constructor
public function uiBitmapImage(bitmapData:BitmapData = null)

Constructor - creates a new uiBitmapImage instance.

Parameters
bitmapData:BitmapData (default = null)
Constant detail
sizeLimitconstant
public static const sizeLimit:int = 2880

Indicates the maximum valid value for width and height. This limitation is imposed by the Flash Player and the value is 2880 for player version 9.

NOTE: Although Flash Player version 10 no longer imposes the limit of 2880 pixels, uiBitmapImage still impose a limit of 2880 pixels each side because the player still does not manipulate BitmapData that exceeds that amount in a proper manner.