当前位置: 首页>>代码示例>>Java>>正文


Java TextureWrap.Repeat方法代码示例

本文整理汇总了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";
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:10,代码来源:TexturePacker_Base.java

示例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;
	}
}
 
开发者ID:Quexten,项目名称:RavTech,代码行数:41,代码来源:SpriteRenderer.java

示例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;
}
 
开发者ID:Inari-Soft,项目名称:inari-firefly-libGDX,代码行数:10,代码来源:GdxGraphicsImpl.java

示例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);
}
 
开发者ID:anonl,项目名称:nvlist,代码行数:12,代码来源:GdxTextureUtil.java

示例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");
}
 
开发者ID:igorcrevar,项目名称:GoingUnder,代码行数:15,代码来源:DesktopRunner.java

示例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");
}
 
开发者ID:igorcrevar,项目名称:GoingUnder,代码行数:14,代码来源:DesktopRunner.java

示例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";
}
 
开发者ID:raeleus,项目名称:skin-composer,代码行数:7,代码来源:TexturePacker.java


注:本文中的com.badlogic.gdx.graphics.Texture.TextureWrap.Repeat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。