本文整理匯總了Java中android.graphics.Paint.Join方法的典型用法代碼示例。如果您正苦於以下問題:Java Paint.Join方法的具體用法?Java Paint.Join怎麽用?Java Paint.Join使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.graphics.Paint
的用法示例。
在下文中一共展示了Paint.Join方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import android.graphics.Paint; //導入方法依賴的package包/類
public void init(AttributeSet attrs) {
if (attrs != null) {
TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.CoustomTextView);
if (a.hasValue(R.styleable.CoustomTextView_strokeColor)) {
float strokeWidth = a.getDimensionPixelSize(R.styleable.CoustomTextView_strokeWidth, 1);
int strokeColor = a.getColor(R.styleable.CoustomTextView_strokeColor, 0xff000000);
float strokeMiter = a.getDimensionPixelSize(R.styleable.CoustomTextView_strokeMiter, 10);
Paint.Join strokeJoin = null;
switch (a.getInt(R.styleable.CoustomTextView_strokeJoinStyle, 0)) {
case (0):
strokeJoin = Paint.Join.MITER;
break;
case (1):
strokeJoin = Paint.Join.BEVEL;
break;
case (2):
strokeJoin = Paint.Join.ROUND;
break;
}
this.setStroke(strokeWidth, strokeColor, strokeJoin, strokeMiter);
}
}
}
示例2: getLineJoinFromString
import android.graphics.Paint; //導入方法依賴的package包/類
public static Paint.Join getLineJoinFromString(String value) {
switch (value) {
case "0":
return Paint.Join.MITER;
case "1":
return Paint.Join.ROUND;
case "2":
return Paint.Join.BEVEL;
default:
return Paint.Join.MITER;
}
}
示例3: toPaintJoin
import android.graphics.Paint; //導入方法依賴的package包/類
Paint.Join toPaintJoin() {
switch (this) {
case Bevel:
return Paint.Join.BEVEL;
case Miter:
return Paint.Join.MITER;
case Round:
return Paint.Join.ROUND;
}
return null;
}
示例4: setStroke
import android.graphics.Paint; //導入方法依賴的package包/類
public void setStroke(float width, int color, Paint.Join join, float miter) {
strokeWidth = width;
strokeColor = color;
strokeJoin = join;
strokeMiter = miter;
}
示例5: getStrokeLineJoin
import android.graphics.Paint; //導入方法依賴的package包/類
public Paint.Join getStrokeLineJoin() {
return strokeLineJoin;
}
示例6: setStrokeLineJoin
import android.graphics.Paint; //導入方法依賴的package包/類
public void setStrokeLineJoin(Paint.Join strokeLineJoin) {
this.strokeLineJoin = strokeLineJoin;
updatePaint();
}
示例7: strokeJoin
import android.graphics.Paint; //導入方法依賴的package包/類
public PaintScript strokeJoin(Paint.Join join) {
paint.setStrokeJoin(join);
return this;
}
示例8: strokeJoin
import android.graphics.Paint; //導入方法依賴的package包/類
public CanvasScript strokeJoin(Paint.Join join) {
createPaintIfNull();
currentPaint.setStrokeJoin(join);
return this;
}