Skip to content

Instantly share code, notes, and snippets.

@opoku
Created May 30, 2013 21:37
Show Gist options
  • Save opoku/5681456 to your computer and use it in GitHub Desktop.
Save opoku/5681456 to your computer and use it in GitHub Desktop.
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