CoolView.java 文件源码

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

项目:sao 作者:
@Override
public void draw(Canvas canvas) {
    int w = getWidth();
    int h = getHeight();
    canvas.clipPath(innerRoundPath(w, h), Region.Op.DIFFERENCE);
    super.draw(canvas);

    degree += speed;
    degree %= 360;
    matrix.setRotate(degree, w / 2, h / 2);
    shader.setLocalMatrix(matrix);
    rectF.left = 0;
    rectF.top = 0;
    rectF.right = w;
    rectF.bottom = h;
    canvas.drawRoundRect(rectF, radius, radius, paint);
    invalidate();

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号