Single-frame collection. Could be useful for non-animated sprites.
Static methods
staticfindEmptyFrame(graphic:FlxGraphic, frameRect:FlxRect):FlxImageFrame
Searches FlxImageFrame
object with the empty frame which have specified size.
Parameters:
graphic |
|
---|---|
frameRect | The size of empty frame to search for. |
Returns:
FlxImageFrame
with empty frame.
staticfindFrame(graphic:FlxGraphic, frameRect:FlxRect, ?frameBorder:FlxPoint):FlxImageFrame
Searches FlxImageFrame
object for specified FlxGraphic
object which have the same frame rectangle.
Parameters:
graphic |
|
---|---|
frameRect |
|
Returns:
FlxImageFrame
object which corresponds to specified rectangle.
Could be null
if there is no such FlxImageFrame
.
staticfromBitmapAddSpacesAndBorders(source:FlxGraphicAsset, border:FlxPoint, ?region:FlxRect):FlxImageFrame
Gets source BitmapData, generates new BitmapData (if there is no such BitmapData in the cache already) and creates FlxImageFrame collection.
Parameters:
source | The source of graphic for frame collection. |
---|---|
border | Border to add around tiles (helps to avoid "tearing" problem). |
region | Region of image to generate image frame from. Default value is |
Returns:
Newly created image frame collection.
staticfromEmptyFrame(graphic:FlxGraphic, frameRect:FlxRect):FlxImageFrame
Generates a FlxImageFrame
object with empty frame of specified size.
Parameters:
graphic | Graphic for the |
---|---|
frameRect | The size of the empty frame to generate
(only |
Returns:
Newly created FlxImageFrame
object with empty frame of specified size.
staticfromFrame(source:FlxFrame):FlxImageFrame
Generates a FlxImageFrame
object from the specified FlxFrame
.
Parameters:
source |
|
---|
Returns:
Created FlxImageFrame
object.
staticfromFrameAddSpacesAndBorders(frame:FlxFrame, border:FlxPoint):FlxImageFrame
Gets FlxFrame
object, generates new BitmapData
with border pixels around
(if there is no such BitmapData in the cache already) and creates image frame collection.
Parameters:
frame | Frame to generate tiles from. |
---|---|
border | Border to add around frame image (helps to avoid "tearing" problem). |
Returns:
Newly created image frame collection.
staticfromGraphic(graphic:FlxGraphic, ?region:FlxRect):FlxImageFrame
Creates FlxImageFrame
for the specified region of FlxGraphic
.
Parameters:
graphic | Graphic for |
---|---|
region | Region of image to create the |
Returns:
Newly created FlxImageFrame
object for the specified region of FlxGraphic
object.
staticfromImage(source:FlxGraphicAsset):FlxImageFrame
Creates a FlxImageFrame
object for the whole image.
Parameters:
source | image graphic for the |
---|
Returns:
Newly created FlxImageFrame
object for specified graphic.
staticfromRectangle(source:FlxGraphicAsset, ?region:FlxRect):FlxImageFrame
Creates a FlxImageFrame
object for specified region of the image.
Parameters:
source | Image graphic for |
---|---|
region | Region of the image to create the |
Returns:
Newly created FlxImageFrame
object for specified region of image.