GTextureAtlas constructor
Creates a new GTextureAtlas object with the provided texture
and
optional data
and adjustXmlSizesRatio
parameters.
The texture
parameter is required and represents the texture atlas image
file.
The data
parameter is optional and represents the data file that
describes the contents of the texture atlas.
The adjustXmlSizesRatio
parameter is optional and represents a scaling
factor for the dimensions described in the data file, if one is provided.
The GTextureAtlas object contains a map of sub-textures, each of which
represents a region within the texture atlas image that can be drawn
independently. If data
is provided, this constructor will parse the data
and populate the sub-texture map.
Implementation
GTextureAtlas(
GTexture? texture, [
Object? data,
double adjustXmlSizesRatio = 1,
]) {
_subTextures = {};
_atlasTexture = texture;
_atlasXmlRatio = adjustXmlSizesRatio;
if (data != null) {
parseAtlasData(data);
}
}