ViewfinderView.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:letv 作者:
private void drawScanningLine(Canvas canvas, Rect frame) {
    if (this.isFirst) {
        this.isFirst = false;
        this.slideTop = 0;
        this.slideBottom = frame.bottom - frame.top;
    }
    this.slideTop += 6;
    if (this.slideTop >= this.slideBottom - MIDDLE_LINE_WIDTH) {
        this.slideTop = 0;
    }
    Rect lineRect = new Rect();
    lineRect.left = frame.left + MIDDLE_LINE_PADDING;
    lineRect.right = frame.right - MIDDLE_LINE_PADDING;
    lineRect.top = frame.top + this.slideTop;
    lineRect.bottom = (frame.top + this.slideTop) + MIDDLE_LINE_WIDTH;
    canvas.drawBitmap(((BitmapDrawable) getResources().getDrawable(R.drawable.sweep_laser)).getBitmap(), null, lineRect, this.paint);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号