本文整理汇总了Java中com.badlogic.gdx.graphics.Texture.TextureWrap.Repeat方法的典型用法代码示例。如果您正苦于以下问题:Java TextureWrap.Repeat方法的具体用法?Java TextureWrap.Repeat怎么用?Java TextureWrap.Repeat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.graphics.Texture.TextureWrap
的用法示例。
在下文中一共展示了TextureWrap.Repeat方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRepeatValue
import com.badlogic.gdx.graphics.Texture.TextureWrap; //导入方法依赖的package包/类
private String getRepeatValue() {
if (settings.wrapX == TextureWrap.Repeat && settings.wrapY == TextureWrap.Repeat)
return "xy";
if (settings.wrapX == TextureWrap.Repeat && settings.wrapY == TextureWrap.ClampToEdge)
return "x";
if (settings.wrapX == TextureWrap.ClampToEdge && settings.wrapY == TextureWrap.Repeat)
return "y";
return "none";
}
示例2: read
import com.badlogic.gdx.graphics.Texture.TextureWrap; //导入方法依赖的package包/类
@Override
public void read (Json json, JsonValue jsonData) {
super.read(json, jsonData);
if (jsonData.has("width"))
width = jsonData.getFloat("width");
if (jsonData.has("height"))
height = jsonData.getFloat("height");
if (jsonData.has("texture"))
texturePath = jsonData.getString("texture");
if (jsonData.has("srcX")) {
useCustomSrc = true;
srcX = jsonData.getInt("srcX");
}
if (jsonData.has("srcY"))
srcY = jsonData.getInt("srcY");
if (jsonData.has("srcWidth"))
srcWidth = jsonData.getInt("srcWidth");
if (jsonData.has("srcHeight"))
srcHeight = jsonData.getInt("srcHeight");
if (jsonData.has("originX"))
originX = jsonData.getFloat("originX");
if (jsonData.has("originY"))
originY = jsonData.getFloat("originY");
if (jsonData.has("minFilter"))
minFilter = jsonData.getString("minFilter").equals("Linear") ? TextureFilter.Linear : TextureFilter.Nearest;
if (jsonData.has("magFilter"))
magFilter = jsonData.getString("magFilter").equals("Linear") ? TextureFilter.Linear : TextureFilter.Nearest;
if (jsonData.has("tint"))
setColor(JsonUtil.readColorFromJson(jsonData, "tint"));
if (jsonData.has("uWrap")) {
String uWrapStrings = jsonData.getString("uWrap");
uWrap = uWrapStrings.equals("ClampToEdge") ? TextureWrap.ClampToEdge
: uWrapStrings.equals("Repeat") ? TextureWrap.Repeat : TextureWrap.MirroredRepeat;
}
if (jsonData.has("vWrap")) {
String vWrapStrings = jsonData.getString("vWrap");
vWrap = vWrapStrings.equals("ClampToEdge") ? TextureWrap.ClampToEdge
: vWrapStrings.equals("Repeat") ? TextureWrap.Repeat : TextureWrap.MirroredRepeat;
}
}
示例3: getLibGDXTextureWrap
import com.badlogic.gdx.graphics.Texture.TextureWrap; //导入方法依赖的package包/类
private TextureWrap getLibGDXTextureWrap( int glConst ) {
for ( TextureWrap tw : TextureWrap.values() ) {
if ( tw.getGLEnum() == glConst ) {
return tw;
}
}
return TextureWrap.Repeat;
}
示例4: toGdxWrap
import com.badlogic.gdx.graphics.Texture.TextureWrap; //导入方法依赖的package包/类
/**
* Converts {@link GLTilingMode} to its equivalent {@link TextureWrap}.
*/
public static TextureWrap toGdxWrap(GLTilingMode mode) {
switch (mode) {
case CLAMP: return TextureWrap.ClampToEdge;
case REPEAT: return TextureWrap.Repeat;
}
throw new IllegalArgumentException("Unsupported tiling mode: " + mode);
}
示例5: createAtlasWidgets
import com.badlogic.gdx.graphics.Texture.TextureWrap; //导入方法依赖的package包/类
private static void createAtlasWidgets() {
Settings settings = new Settings();
settings.minHeight = 512;
settings.minWidth = 512;
settings.maxHeight = 512;
settings.maxWidth = 512;
settings.paddingY = 2;
settings.paddingX = 2;
settings.wrapY = TextureWrap.Repeat;
TexturePacker2.process(settings,
//"D:\\gamepictures\\widgets\\",
"D:\\gamepictures\\widgets\\redjavolak",
"D:/MySelf/Android/Workspace/HgRepo/GoingUnder/assets/atlases", "widgets");
}
示例6: createAtlas
import com.badlogic.gdx.graphics.Texture.TextureWrap; //导入方法依赖的package包/类
private static void createAtlas() {
Settings settings = new Settings();
settings.minHeight = 512;
settings.minWidth = 512;
settings.maxHeight = 512;
settings.maxWidth = 512;
settings.paddingY = 2;
settings.paddingX = 2;
settings.wrapY = TextureWrap.Repeat;
TexturePacker2.process(settings,
"D:\\gamepictures\\2\\",
"D:/MySelf/Android/Workspace/HgRepo/GoingUnder/assets/atlases", "game");
}
示例7: getRepeatValue
import com.badlogic.gdx.graphics.Texture.TextureWrap; //导入方法依赖的package包/类
private String getRepeatValue () {
if (settings.wrapX == TextureWrap.Repeat && settings.wrapY == TextureWrap.Repeat) return "xy";
if (settings.wrapX == TextureWrap.Repeat && settings.wrapY == TextureWrap.ClampToEdge) return "x";
if (settings.wrapX == TextureWrap.ClampToEdge && settings.wrapY == TextureWrap.Repeat) return "y";
return "none";
}