@Override public void applyToTexture(final String option, final Texture texture) { final int separatorPosition = option.indexOf("_"); if (separatorPosition >= option.length() - 2) { final String axis = option.substring(separatorPosition + 1); final String mode = option.substring(0, separatorPosition); final Texture.WrapAxis wrapAxis = Texture.WrapAxis.valueOf(axis); texture.setWrap(wrapAxis, Texture.WrapMode.valueOf(mode)); } else { texture.setWrap(Texture.WrapMode.valueOf(option)); } } },
@Override public void applyToTexture(final String option, final Texture texture) { final int separatorPosition = option.indexOf("_"); if (separatorPosition >= option.length() - 2) { final String axis = option.substring(separatorPosition + 1); final String mode = option.substring(0, separatorPosition); final Texture.WrapAxis wrapAxis = Texture.WrapAxis.valueOf(axis); texture.setWrap(wrapAxis, Texture.WrapMode.valueOf(mode)); } else { texture.setWrap(Texture.WrapMode.valueOf(option)); } } },
protected static String formatWrapMode(Texture texVal, Texture.WrapAxis axis) { WrapMode mode; try { mode = texVal.getWrap(axis); } catch (IllegalArgumentException e) { //this axis doesn't exist on the texture return ""; } if (mode != WrapMode.EdgeClamp) { return "Wrap" + mode.name() + "_" + axis.name() + " "; } return ""; }
private String getWrapMode(Texture texVal, Texture.WrapAxis axis) { WrapMode mode = WrapMode.EdgeClamp; try{ mode = texVal.getWrap(axis); }catch (IllegalArgumentException e){ //this axis doesn't exist on the texture return ""; } if(mode != WrapMode.EdgeClamp){ return"Wrap"+ mode.name() + "_" + axis.name() + " "; } return ""; }
protected static String formatWrapMode(Texture texVal, Texture.WrapAxis axis) { WrapMode mode; try { mode = texVal.getWrap(axis); } catch (IllegalArgumentException e) { //this axis doesn't exist on the texture return ""; } if (mode != WrapMode.EdgeClamp) { return "Wrap" + mode.name() + "_" + axis.name() + " "; } return ""; }
private String getWrapMode(Texture texVal, Texture.WrapAxis axis) { WrapMode mode = WrapMode.EdgeClamp; try{ mode = texVal.getWrap(axis); }catch (IllegalArgumentException e){ //this axis doesn't exist on the texture return ""; } if(mode != WrapMode.EdgeClamp){ return"Wrap"+ mode.name() + "_" + axis.name() + " "; } return ""; }