SegmentElement.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:ametro 作者:
private Paint createPaint(int color, float lineWidth, boolean isWorking){
    Paint paint = new Paint();
    paint.setStyle(Style.STROKE);
    paint.setAntiAlias(true);
    paint.setColor(color);

    if (isWorking) {
        paint.setStrokeWidth(lineWidth);
        paint.setPathEffect(
                new CornerPathEffect(lineWidth * 0.2f));
    } else {
        paint.setStrokeWidth(lineWidth * 0.75f);
        paint.setPathEffect(new ComposePathEffect(
                new DashPathEffect(new float[]{lineWidth * 0.8f, lineWidth * 0.2f}, 0),
                new CornerPathEffect(lineWidth * 0.2f)
        ));
    }
    return paint;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号