求大神帮忙还原反编译之后的代码,实在是看不懂啦。。。。

CCW_2015 2016-09-27 05:25:46
public void onDraw(Canvas paramCanvas) {
this.width = paramCanvas.getWidth();
this.height = paramCanvas.getHeight();
if ((directtion == 0) || (directtion == 2)) {
if ((this.width > this.height) && (!Build.MODEL.equals("GT-P7500")) && (!Build.MODEL.equals("SM-T520")))
this.width = (3 * this.width / 4);
if (idcardType == 3000) ;
for (this.frame = new Rect((int) (0.15D * this.width), this.height / 3, (int) (0.8D * this.width), 2 * this.height / 3); this.frame == null; this.frame = new Rect((int) (0.2D * this.width), (int) (this.height - 0.45D * this.width) / 2, (int) (0.85D * this.width), (int) (this.height + 0.45D * this.width) / 2))
while (true) { label135:return;
if ((idcardType == 2) || (idcardType == 22) || (idcardType == 1030) || (idcardType == 1031) || (idcardType == 1032) || (idcardType == 1005) || (idcardType == 1001) || (idcardType == 2001) || (idcardType == 2004) || (idcardType == 2002) || (idcardType == 2003) || (idcardType == 14) || (idcardType == 15) || (idcardType == 25) || (idcardType == 26))
this.frame = new Rect((int) (0.2D * this.width), (int) (this.height - 0.41004673D * this.width) / 2, (int) (0.85D * this.width), (int) (this.height + 0.41004673D * this.width) / 2);
if ((idcardType != 5) && (idcardType != 6))
break;
this.frame = new Rect((int) (0.24D * this.width), (int) (this.height - 0.41004673D * this.width) / 2, (int) (0.8100000000000001D * this.width), (int) (this.height + 0.41004673D * this.width) / 2);
}
if (!this.isFirst) {
this.isFirst = true;
this.slideTop = (this.height / 3);
this.slideBottom = (2 * this.height / 3);
this.slideTop1 = (this.width / 2);
}
this.paint.setColor(Color.argb(48, 0, 0, 0));
paramCanvas.drawRect(0.0F, 0.0F, this.width, this.frame.top, this.paint);
paramCanvas.drawRect(0.0F, this.frame.top, this.frame.left, 1 + this.frame.bottom, this.paint);
paramCanvas.drawRect(1 + this.frame.right, this.frame.top, this.width, 1 + this.frame.bottom, this.paint);
paramCanvas.drawRect(0.0F, 1 + this.frame.bottom, this.width, this.height, this.paint);
this.paint.setColor(Color.rgb(243, 153, 18));
if (idcardType == 3000) {
paramCanvas.drawRect(-2 + (4 + this.frame.left), this.frame.top, 2 + (-4 + this.frame.right), 4 + this.frame.top, this.paint);
this.paint.setAlpha(SCANNER_ALPHA[this.scannerAlpha]);
this.scannerAlpha = ((1 + this.scannerAlpha) % SCANNER_ALPHA.length);
}
paramCanvas.drawRect(-2 + (4 + this.frame.left), this.frame.top, 50 + (-2 + (4 + this.frame.left)), 4 + this.frame.top, this.paint);
paramCanvas.drawRect(-2 + (4 + this.frame.left), this.frame.top, 2 + (4 + this.frame.left), 50 + this.frame.top, this.paint);
if (this.checkLeftFrame == 1)
paramCanvas.drawRect(-2 + (4 + this.frame.left), this.frame.top, 2 + (4 + this.frame.left), this.frame.bottom, this.paint);
if (this.checkTopFrame == 1)
paramCanvas.drawRect(-2 + (4 + this.frame.left), this.frame.top, 2 + (-4 + this.frame.right), 4 + this.frame.top, this.paint);
if (this.checkRightFrame == 1)
paramCanvas.drawRect(-2 + (-4 + this.frame.right), this.frame.top, 2 + (-4 + this.frame.right), this.frame.bottom, this.paint);
if (this.checkRightFrame == 1)
paramCanvas.drawRect(-2 + (4 + this.frame.left), -4 + this.frame.bottom, -2 + (-4 + this.frame.right), this.frame.bottom, this.paint);
}while (true) { label1616:
postInvalidateDelayed(50L, 0, 0, this.width, this.height);
break label135:
if ((directtion != 1) && (directtion != 3))
continue;
if (this.width < this.height) {
this.width = (4 * this.width / 3);
this.height = (3 * this.height / 4);
this.frame = new Rect(0, this.height / 2, 3 * this.width / 4, 2 * this.height / 3);
if (this.frame != null) ;
if (!this.isFirst) {
this.isFirst = true;
this.slideTop = (this.width / 3);
this.slideBottom = (2 * this.width / 3);
this.slideTop1 = (this.height / 2);
}
this.paint.setColor(Color.argb(48, 0, 0, 0));
paramCanvas.drawRect(0.0F, 0.0F, this.width, this.frame.top, this.paint);
paramCanvas.drawRect(0.0F, this.frame.top, this.frame.left, 1 + this.frame.bottom, this.paint);
paramCanvas.drawRect(1 + this.frame.right, this.frame.top, this.width, 1 + this.frame.bottom, this.paint);
paramCanvas.drawRect(0.0F, 1 + this.frame.bottom, this.width, this.height, this.paint);
this.paint.setColor(Color.rgb(243, 153, 18));
paramCanvas.drawRect(-2 + (4 + this.frame.left), this.frame.top, 2 + (-4 + this.frame.right), 4 + this.frame.top, this.paint);
this.paint.setAlpha(SCANNER_ALPHA[this.scannerAlpha]);
this.scannerAlpha = ((1 + this.scannerAlpha) % SCANNER_ALPHA.length);
}
if (idcardType == 3000) ;
for (this.frame = new Rect((int) (0.2D * this.width), this.height / 3, (int) (0.85D * this.width), 2 * this.height / 3); ; this.frame = new Rect((int) (0.2D * this.width), (int) (this.height - 0.45D * this.width) / 2, (int) (0.85D * this.width), (int) (this.height + 0.45D * this.width) / 2))
while (true) {
if (this.frame != null) ;
if (!this.isFirst) {
this.isFirst = true;
this.slideTop = (this.width / 3);
this.slideBottom = (2 * this.width / 3);
this.slideTop1 = (this.height / 3);
}
this.paint.setColor(Color.argb(48, 0, 0, 0));
paramCanvas.drawRect(0.0F, 0.0F, this.width, this.frame.top, this.paint);
paramCanvas.drawRect(0.0F, this.frame.top, this.frame.left, 1 + this.frame.bottom, this.paint);
paramCanvas.drawRect(1 + this.frame.right, this.frame.top, this.width, 1 + this.frame.bottom, this.paint);
paramCanvas.drawRect(0.0F, 1 + this.frame.bottom, this.width, this.height, this.paint);
this.paint.setColor(Color.rgb(243, 153, 18));
if (idcardType != 3000)
break label3011;
paramCanvas.drawRect(-2 + (4 + this.frame.left), this.frame.top, 2 + (-4 + this.frame.right), 4 + this.frame.top, this.paint);
break label1616:
if ((idcardType == 2) || (idcardType == 22) || (idcardType == 1030) || (idcardType == 1031) || (idcardType == 1032) || (idcardType == 1005) || (idcardType == 1001) || (idcardType == 2001) || (idcardType == 2004) || (idcardType == 2002) || (idcardType == 2003) || (idcardType == 14) || (idcardType == 15) || (idcardType == 25) || (idcardType == 26))
this.frame = new Rect((int) (0.2D * this.width), (int) (this.height - 0.41004673D * this.width) / 2, (int) (0.85D * this.width), (int) (this.height + 0.41004673D * this.width) / 2);
if ((idcardType != 5) && (idcardType != 6))
break;
this.frame = new Rect((int) (0.24D * this.width), (int) (this.height - 0.41004673D * this.width) / 2, (int) (0.8100000000000001D * this.width), (int) (this.height + 0.41004673D * this.width) / 2);
}
label3011:
paramCanvas.drawRect(-2 + (4 + this.frame.left), this.frame.top, 50 + (-2 + (4 + this.frame.left)), 4 + this.frame.top, this.paint);
if (this.checkLeftFrame == 1)
paramCanvas.drawRect(-2 + (4 + this.frame.left), this.frame.top, 2 + (4 + this.frame.left), this.frame.bottom, this.paint);
if (this.checkTopFrame == 1)
paramCanvas.drawRect(-2 + (4 + this.frame.left), this.frame.top, 2 + (-4 + this.frame.right), 4 + this.frame.top, this.paint);
if (this.checkRightFrame == 1)
paramCanvas.drawRect(-2 + (-4 + this.frame.right), this.frame.top, 2 + (-4 + this.frame.right), this.frame.bottom, this.paint);
if (this.checkBottomFrame != 1)
continue;
paramCanvas.drawRect(-2 + (4 + this.frame.left), -4 + this.frame.bottom, -2 + (-4 + this.frame.right), this.frame.bottom, this.paint);
}
}
...全文
610 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
山鹰1985 2016-09-30
  • 打赏
  • 举报
回复
引用 5 楼 chenchuanwen111 的回复:
[quote=引用 3 楼 ink_s 的回复:] 就是一些计算
对对对。。。[/quote] 你要做图片合成吗?这个网上很多的。蒙版也有很多。
CCW_2015 2016-09-28
  • 打赏
  • 举报
回复
引用 3 楼 ink_s 的回复:
就是一些计算
对对对。。。
CCW_2015 2016-09-28
  • 打赏
  • 举报
回复
引用 2 楼 u012137924 的回复:
我了个去,反编译人家的 onDraw 方法做甚,这个是相机中的 onDraw 方法?
额,这是一个自定义的蒙版类,里面有一些矩阵的算法。。。
ink_s 2016-09-27
  • 打赏
  • 举报
回复
就是一些计算
山鹰1985 2016-09-27
  • 打赏
  • 举报
回复
我了个去,反编译人家的 onDraw 方法做甚,这个是相机中的 onDraw 方法?
CCW_2015 2016-09-27
  • 打赏
  • 举报
回复
求帮助。。。

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧