本文整理汇总了Java中android.graphics.Path.FillType方法的典型用法代码示例。如果您正苦于以下问题:Java Path.FillType方法的具体用法?Java Path.FillType怎么用?Java Path.FillType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.graphics.Path
的用法示例。
在下文中一共展示了Path.FillType方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newInstance
import android.graphics.Path; //导入方法依赖的package包/类
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);
}
示例2: getFillTypeFromString
import android.graphics.Path; //导入方法依赖的package包/类
public static Path.FillType getFillTypeFromString(String value) {
Path.FillType fillType = Path.FillType.WINDING;
if (value.equals("1")) {
fillType = Path.FillType.EVEN_ODD;
}
return fillType;
}
示例3: ShapeFill
import android.graphics.Path; //导入方法依赖的package包/类
private ShapeFill(boolean fillEnabled, Path.FillType fillType,
@Nullable AnimatableColorValue color, @Nullable AnimatableIntegerValue opacity) {
this.fillEnabled = fillEnabled;
this.fillType = fillType;
this.color = color;
this.opacity = opacity;
}
示例4: getFillTypeFromState
import android.graphics.Path; //导入方法依赖的package包/类
private Path.FillType getFillTypeFromState() {
if (state.style.fillRule == null)
return Path.FillType.WINDING;
switch (state.style.fillRule) {
case EvenOdd:
return Path.FillType.EVEN_ODD;
case NonZero:
default:
return Path.FillType.WINDING;
}
}
示例5: getClipRuleFromState
import android.graphics.Path; //导入方法依赖的package包/类
private Path.FillType getClipRuleFromState() {
if (state.style.clipRule == null)
return Path.FillType.WINDING;
switch (state.style.clipRule) {
case EvenOdd:
return Path.FillType.EVEN_ODD;
case NonZero:
default:
return Path.FillType.WINDING;
}
}
示例6: getFillType
import android.graphics.Path; //导入方法依赖的package包/类
public Path.FillType getFillType() {
return fillType;
}
示例7: setFillType
import android.graphics.Path; //导入方法依赖的package包/类
public void setFillType(Path.FillType fillType) {
this.fillType = fillType;
if (originalPath != null)
originalPath.setFillType(fillType);
}
示例8: getFillType
import android.graphics.Path; //导入方法依赖的package包/类
Path.FillType getFillType() {
return fillType;
}