BitmapData pool class.
Notes on implementation:
get() starts searching for a suitable BitmapData from the start of the pool list
put() adds the BitmapData to the start of the pool list (removing the last one if the pool exceeds maxLength)
Static variables
Static methods
staticget(w:Int, h:Int, transparent:Bool = true, ?fillColor:FlxColor, exactSize:Bool = false):BitmapData
Returns a BitmapData with the specified parameters. If a suitable BitmapData cannot be found in the pool a new one will be created. If fillColor is specified the returned BitmapData will also be cleared with it.
Parameters:
exactSize | If false a BitmapData with size >= [w, h] may be returned. |
---|