Created
May 30, 2013 21:37
-
-
Save opoku/5681456 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SvgUtils { | |
public static Array<String> load (AssetSubset subset, AssetBundle bundle) { | |
Array<String> newKeys = new Array<String>(); | |
for (AssetDescriptor<?> descriptor : bundle.getDescriptors()) { | |
newKeys.add(load(subset, (AssetDescriptor<SvgImage>)descriptor)); | |
} | |
return newKeys; | |
} | |
public static String load (AssetSubset subset, AssetDescriptor<SvgImage> descriptor) { | |
return load(subset, descriptor.fileName, (SvgImageParameters)descriptor.params); | |
} | |
public static String load (AssetSubset subset, String path, SvgImageParameters params) { | |
String key = (params != null) ? "#" + params.toStringKey() : ""; | |
key = path + key; | |
App.assets().load(subset, SvgImage.class, key); | |
return key; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment