This class manages multiple AtlasRegions containing the same image at different resolutions. At render time, it will use the smallest region that is larger than the specified scale (or the largest region otherwise.)
Constructor
new (regions : Array<AtlasRegion>) : Void
Creates a new AtlasResolutions
Parameters:
regions | An array of AtlasRegions |
Variables
read only height : Int
read only width : Int
Functions
draw (x : Float, y : Float, scaleX : Float = 1, scaleY : Float = 1, angle : Float = 0, color : Color = Color.White, alpha : Float = 1, shader : Shader, smooth : Bool, blend : BlendMode, clipRect : Rectangle, flexibleLayer : Bool = false) : Void
Prepares tile data for rendering
Parameters:
x | The x-axis location to draw the tile | |
y | The y-axis location to draw the tile | |
scaleX | The scale value for the x-axis | |
scaleY | The scale value for the y-axis | |
angle | An angle to rotate the tile in degrees | |
red | A red tint value | |
green | A green tint value | |
blue | A blue tint value | |
alpha | The tile's opacity | |
smooth | Whether to draw with antialiasing | |
blend | Blend mode | |
clipRect | Clipping rectangle |
drawMatrix (tx : Float, ty : Float, a : Float, b : Float, c : Float, d : Float, color : Color = Color.White, alpha : Float = 1, shader : Shader, smooth : Bool, blend : BlendMode, clipRect : Rectangle, flexibleLayer : Bool = false) : Void
Prepares tile data for rendering using a matrix
Parameters:
tx | X-Axis translation | |
ty | Y-Axis translation | |
a | Top-left | |
b | Top-right | |
c | Bottom-left | |
d | Bottom-right | |
red | Red color value | |
green | Green color value | |
blue | Blue color value | |
alpha | The tile's opacity | |
smooth | Whether to draw with antialiasing | |
blend | Blend mode | |
clipRect | Clipping rectangle |