Base class for all frame types
Static methods
Variables
Methods
clipTo(clip:FlxRect, ?clippedFrame:FlxFrame):FlxFrame
Frame clipping
Parameters:
clip | Clipping rectangle to apply on frame |
---|---|
clippedFrame | The frame which will contain result of original frame clipping.
If |
Returns:
Result of applying frame clipping
copyTo(?clone:FlxFrame):FlxFrame
Copies data from this frame into specified frame.
Parameters:
clone | Frame to fill data with. If |
---|
Returns:
Frame with data of this frame.
paint(?bmd:BitmapData, ?point:Null<Point>, mergeAlpha:Bool = false, disposeIfNotEqual:Bool = false):BitmapData
Draws frame on specified BitmapData
object.
Parameters:
bmd |
|
---|---|
point | Where to draw this frame on the specified |
mergeAlpha | Whether to merge alphas or not.
(works like with |
disposeIfNotEqual | Whether dispose passed |
Returns:
Modified or newly created BitmapData
with frame image on it.
paintRotatedAndFlipped(?bmd:BitmapData, ?point:Null<Point>, rotation:FlxFrameAngle = FlxFrameAngle.ANGLE_0, flipX:Bool = false, flipY:Bool = false, mergeAlpha:Bool = false, disposeIfNotEqual:Bool = false):BitmapData
Draws rotated and flipped frame on specified BitmapData object.
Parameters:
bmd | BitmapData object to draw this frame on.
If |
---|---|
point | Where to draw this frame on the specified |
rotation | How much rotate the frame. |
flipX | Do we need to flip frame horizontally. |
flipY | Do we need to flip frame vertically. |
mergeAlpha | Whether to merge alphas or not
(works like with |
disposeIfNotEqual | Whether dispose passed |
Returns:
Modified or newly created BitmapData
with frame image on it.
prepareMatrix(mat:FlxMatrix, rotation:FlxFrameAngle = FlxFrameAngle.ANGLE_0, flipX:Bool = false, flipY:Bool = false):FlxMatrix
Prepares matrix for frame tile/triangles rendering.
Parameters:
mat | Matrix to transform/prepare |
---|---|
rotation | Rotation to apply to specified matrix. |
flipX | Do we need to flip frame horizontally |
flipY | Do we need to flip frame vertically |
Returns:
Transformed matrix which can be used for frame drawing.
setBorderTo(border:FlxPoint, ?frameToFill:FlxFrame):FlxFrame
Just a helper method for some frame adjusting. Try to not use it, since it may cause memory leaks.
Parameters:
border | Amount to clip from frame |
---|
Returns:
Clipped frame
subFrameTo(rect:FlxRect, ?frameToFill:FlxFrame):FlxFrame
Generates frame with specified subregion of this frame.
Parameters:
rect | Frame region to generate frame for. |
---|---|
frameToFill | Frame to fill with data. If |
Returns:
Specified frameToFill
object but filled with data.