private void drawBorder(Canvas canvas){
if(mBorderWidth > 0){
Paint paint = new Paint();
paint.setStrokeWidth(mBorderWidth);
paint.setStyle(Paint.Style.STROKE);
paint.setColor(mBorderColor);
paint.setAntiAlias(true);
if (mShapeType == 0) {
canvas.drawCircle(mWidth / 2, mHeight / 2, mWidth / 2, paint);
} else {
// 当ShapeType = 1 时 图片为圆角矩形
RectF rectf = new RectF(0, 0, getWidth(), getHeight());
canvas.drawRoundRect(rectf, mRadius, mRadius, paint);
}
}
}
MLImageView.java 文件源码
java
阅读 39
收藏 0
点赞 0
评论 0
项目:LeCatApp
作者:
评论列表
文章目录