}
};
page.texture.setFilter(minFilter, magFilter);
for (String name : page.addedRects) {
Rectangle rect = page.rects.get(name);
TextureRegion region = new TextureRegion(page.texture, (int)rect.x, (int)rect.y, (int)rect.width,
(int)rect.height);
atlas.addRegion(name, region);
}
page.addedRects.clear();
}
} else {
if (page.addedRects.size > 0) {
page.texture.load(page.texture.getTextureData());
for (String name : page.addedRects) {
Rectangle rect = page.rects.get(name);
TextureRegion region = new TextureRegion(page.texture, (int)rect.x, (int)rect.y, (int)rect.width,
(int)rect.height);
atlas.addRegion(name, region);
}
page.addedRects.clear();