Package | com.ghostwire.ui.core |
Class | public class uiBitmapImage |
Inheritance | uiBitmapImage ![]() |
Subclasses | uiFocusRect |
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 ~
Property | Defined 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 |
Method | Defined by | ||
---|---|---|---|
uiBitmapImage(bitmapData:BitmapData = null)
Constructor - creates a new
uiBitmapImage instance. | uiBitmapImage |
Constant | Defined by | ||
---|---|---|---|
sizeLimit : int = 2880 [static]
Indicates the maximum valid value for
width and height . | uiBitmapImage |
edge | property |
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.
midX | property |
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.
midY | property |
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.
repeatX | property |
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
.
repeatY | property |
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
.
uiBitmapImage | () | constructor |
public function uiBitmapImage(bitmapData:BitmapData = null)
Constructor - creates a new uiBitmapImage
instance.
bitmapData:BitmapData (default = null )
|
sizeLimit | constant |
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.