|
@@ -117,18 +117,19 @@ public class CropView extends View {
|
|
|
switch (scanType) {
|
|
switch (scanType) {
|
|
|
case SCAN_TYPE_POSTAL:
|
|
case SCAN_TYPE_POSTAL:
|
|
|
// 邮箱
|
|
// 邮箱
|
|
|
- coverWidth = (int) (getWidth()*0.815);
|
|
|
|
|
|
|
+ coverWidth = (int) (getWidth()*0.82);
|
|
|
// 最小高度不能小于图片的高度
|
|
// 最小高度不能小于图片的高度
|
|
|
// coverHeight = Math.max(minHeight, (int)(getWidth()*0.3));
|
|
// coverHeight = Math.max(minHeight, (int)(getWidth()*0.3));
|
|
|
- coverHeight = SizeUtils.dp2px(65);
|
|
|
|
|
|
|
+ coverHeight = SizeUtils.dp2px(74);
|
|
|
sX = (getWidth()*1.0f-coverWidth)/2;
|
|
sX = (getWidth()*1.0f-coverWidth)/2;
|
|
|
sY = getWidth()*0.177f;
|
|
sY = getWidth()*0.177f;
|
|
|
mFrameRectF = new RectF(sX, sY, sX + coverWidth, sY + coverHeight);
|
|
mFrameRectF = new RectF(sX, sY, sX + coverWidth, sY + coverHeight);
|
|
|
break;
|
|
break;
|
|
|
case SCAN_TYPE_ADDRESS:
|
|
case SCAN_TYPE_ADDRESS:
|
|
|
case SCAN_TYPE_NAME:
|
|
case SCAN_TYPE_NAME:
|
|
|
- coverWidth = (int) (getWidth()*0.75);
|
|
|
|
|
- coverHeight = (int) (getWidth()*0.58);
|
|
|
|
|
|
|
+ // 宽400,高300,padding 50 + 50
|
|
|
|
|
+ coverWidth = (int) (getWidth()*0.78);
|
|
|
|
|
+ coverHeight = (int) (getWidth()*0.48);
|
|
|
sX = (getWidth()*1.0f-coverWidth)/2;
|
|
sX = (getWidth()*1.0f-coverWidth)/2;
|
|
|
sY = (getHeight()*1.0f-coverHeight)/2;
|
|
sY = (getHeight()*1.0f-coverHeight)/2;
|
|
|
mFrameRectF = new RectF(sX, sY, sX + coverWidth, sY + coverHeight);
|
|
mFrameRectF = new RectF(sX, sY, sX + coverWidth, sY + coverHeight);
|