本文整理匯總了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;
}