class flixel.addons.ui.FlxUI9SliceSprite extends FlxUISprite implements IFlxUIWidget implements IResizable
Available on all platforms
@author Lars Doucet
Class Fields
static function paintBitmapSection(g:BitmapData, assetId:String, src:FlxRect, dst:FlxRect, ?srcData:BitmapData = null, ?tile:Int = 0, ?smooth:Bool = false, ?raw:BitmapData = null):Void
static function paintCompoundBitmap(g:BitmapData, assetID:String, sourceRects:Map<String, FlxRect>, targetRect:FlxRect, ?tile:Int = 0, ?smooth:Bool = false, ?raw:BitmapData = null):Void
static function paintScale9(g:BitmapData, assetID:String, scale9:Array<Int>, rc:FlxRect, ?tile:Int = 0, ?smooth:Bool = false, ?raw:BitmapData = null):Void
Does the actual drawing for a 9-slice scaled graphic *
g | the graphics object for drawing to (ie, sprite.graphic) * |
assetID | id of bitmapdata asset you are scaling * |
scale9 | int array defining 2 points that define the grid as [x1,y1,x2,y2] (upper-interior-left, lower-interior-right) * |
rc | rectangle object defining how big you want to scale it to * |
tile | if a bit is false, scale those pieces, if true, tile them (default both false) * |
smooth | whether to smooth when scaling or not (default false) * |
raw | raw pixels supplied, if any |
Instance Fields
function new(X:Float, Y:Float, Graphic:Dynamic, Rect:Rectangle, ?Slice9:Array<Int> = null, ?Tile:Int = 0, ?Smooth:Bool = false, ?Id:String = '', ?Ratio:Float = -1, ?Resize_point:FlxPoint = null):Void
@param
X | X position of final sprite * |
Y | Y position of final sprite * |
Graphic | Asset * |
Rect | Width/Height of the final scaled sprite * |
slice9 | [x1,y1,x2,y2] : 2 points (upper-left middle and lower-right middle) that define the 9-slice grid * |
tile | Whether to tile the middle pieces or stretch them (default is false --> stretch) * |
smooth | When stretching, whether to smooth middle pieces (default false) * |
id | if Graphic is a BitmapData, manually specify its original source id, if any * |
ratio | Resize ratio to force, if desired (W/H) * |