本文整理汇总了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;
}