if(frontCamera) {//左右值交换(rect.left==0的时候容易看出来) int left = rect.left; rect.left = width - rect.right; rect.right = width - left; }