static ShapeFill newInstance(JSONObject json, LottieComposition composition) {
AnimatableColorValue color = null;
boolean fillEnabled;
AnimatableIntegerValue opacity = null;
JSONObject jsonColor = json.optJSONObject("c");
if (jsonColor != null) {
color = AnimatableColorValue.Factory.newInstance(jsonColor, composition);
}
JSONObject jsonOpacity = json.optJSONObject("o");
if (jsonOpacity != null) {
opacity = AnimatableIntegerValue.Factory.newInstance(jsonOpacity, composition);
}
fillEnabled = json.optBoolean("fillEnabled");
int fillTypeInt = json.optInt("r", 1);
Path.FillType fillType = fillTypeInt == 1 ? Path.FillType.WINDING : Path.FillType.EVEN_ODD;
return new ShapeFill(fillEnabled, fillType, color, opacity);
}
ShapeFill.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:atlas
作者:
评论列表
文章目录