本文整理匯總了Java中com.badlogic.gdx.graphics.Texture.setWrap方法的典型用法代碼示例。如果您正苦於以下問題:Java Texture.setWrap方法的具體用法?Java Texture.setWrap怎麽用?Java Texture.setWrap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.badlogic.gdx.graphics.Texture
的用法示例。
在下文中一共展示了Texture.setWrap方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: load
import com.badlogic.gdx.graphics.Texture; //導入方法依賴的package包/類
private void load(TextureAtlasData data) {
ObjectMap<TextureAtlasData.Page, Texture> pageToTexture = new ObjectMap<TextureAtlasData.Page, Texture>();
for (TextureAtlasData.Page page : data.getPages()) {
Texture texture = TextureDecryptor.loadTexture(crypto, page.textureFile, page.format, page.useMipMaps);
texture.setFilter(page.minFilter, page.magFilter);
texture.setWrap(page.uWrap, page.vWrap);
getTextures().add(texture);
pageToTexture.put(page, texture);
}
// Same as libGDX source
for (TextureAtlasData.Region region : data.getRegions()) {
int width = region.width;
int height = region.height;
AtlasRegion atlasRegion = new AtlasRegion(pageToTexture.get(region.page), region.left, region.top,
region.rotate ? height : width, region.rotate ? width : height);
atlasRegion.index = region.index;
atlasRegion.name = region.name;
atlasRegion.offsetX = region.offsetX;
atlasRegion.offsetY = region.offsetY;
atlasRegion.originalHeight = region.originalHeight;
atlasRegion.originalWidth = region.originalWidth;
atlasRegion.rotate = region.rotate;
atlasRegion.splits = region.splits;
atlasRegion.pads = region.pads;
if (region.flip) atlasRegion.flip(false, true);
getRegions().add(atlasRegion);
}
}