CircleImageView.java 文件源码

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

项目:OpenEyesReading-android 作者:
private void setupView() {
    if (!mReady) {
        mSetupPending = true;
        return;
    }
    if (mBitmap == null) return;
    mBitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
    mBitmapPaint.setAntiAlias(true);
    mBitmapPaint.setShader(mBitmapShader);
    mBorderPaint.setStyle(Paint.Style.STROKE);
    mBorderPaint.setAntiAlias(true);
    mBitmapHeight = mBitmap.getHeight();
    mBitmapWidth = mBitmap.getWidth();
    mBorderRect.set(0, 0, getWidth(), getHeight());
    mDrawableRect.set(mBorderRect);
    mDrawableRadius = Math.min(mDrawableRect.height() / 2, mDrawableRect.width() / 2);
    updateShaderMatrix();
    invalidate();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号