public class ConcreteDrawingStrategy extends java.lang.Object implements IDrawingStrategy
构造器和说明 |
---|
ConcreteDrawingStrategy() |
限定符和类型 | 方法和说明 |
---|---|
void |
algorithm(android.graphics.Canvas canvas,
int childTotal,
int curChild,
ResInfo res,
DisplayInfo info)
根据提供的画布, 和可绘制的位置实现具体效果
|
float |
getSpacingQuality() |
boolean |
isPicRotate() |
void |
setIsPicRotate(boolean mIsPicRotate)
设置qq群组图片去除重叠方法
|
void |
setSpacing(float spacingQuality)
设置两张图片的间距
|
public void algorithm(android.graphics.Canvas canvas, int childTotal, int curChild, ResInfo res, DisplayInfo info)
IDrawingStrategy
algorithm
在接口中 IDrawingStrategy
canvas
- AvatarView.onDraw(Canvas)
中的画布childTotal
- 图片的总个数curChild
- 当前图片是第几张图片res
- 需要操作的资源info
- 每个内部元素应该摆放的位置信息类public void setSpacing(float spacingQuality)
spacingQuality
- 接收处理范围 0~2 ; 2的时候空隙为最大, 0的时候会重叠. 默认为1public boolean isPicRotate()
public void setIsPicRotate(boolean mIsPicRotate)
mIsPicRotate
- 为true时, 为QQ群组的样式, 默认属性
为false时: 可去除两个图片重叠确实的效果public float getSpacingQuality()