private void updatePaint() {
Bitmap bitmap = getBitmap();
if (mLastBitmap == null || mLastBitmap.get() != bitmap) {
mLastBitmap = new WeakReference<Bitmap>(bitmap);
mPaint.setShader(new BitmapShader(bitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP));
mIsShaderTransformDirty = true;
}
if (mIsShaderTransformDirty) {
mPaint.getShader().setLocalMatrix(mTransform);
mIsShaderTransformDirty = false;
}
}
RoundedBitmapDrawable.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录