BoundingBox.java (zxing-zxing-3.4.0) | : | BoundingBox.java (zxing-zxing-3.4.1) | ||
---|---|---|---|---|
skipping to change at line 68 | skipping to change at line 68 | |||
this.topRight = topRight; | this.topRight = topRight; | |||
this.bottomRight = bottomRight; | this.bottomRight = bottomRight; | |||
this.minX = (int) Math.min(topLeft.getX(), bottomLeft.getX()); | this.minX = (int) Math.min(topLeft.getX(), bottomLeft.getX()); | |||
this.maxX = (int) Math.max(topRight.getX(), bottomRight.getX()); | this.maxX = (int) Math.max(topRight.getX(), bottomRight.getX()); | |||
this.minY = (int) Math.min(topLeft.getY(), topRight.getY()); | this.minY = (int) Math.min(topLeft.getY(), topRight.getY()); | |||
this.maxY = (int) Math.max(bottomLeft.getY(), bottomRight.getY()); | this.maxY = (int) Math.max(bottomLeft.getY(), bottomRight.getY()); | |||
} | } | |||
BoundingBox(BoundingBox boundingBox) { | BoundingBox(BoundingBox boundingBox) { | |||
this.image = boundingBox.image; | this.image = boundingBox.image; | |||
this.topLeft = boundingBox.getTopLeft(); | this.topLeft = boundingBox.topLeft; | |||
this.bottomLeft = boundingBox.getBottomLeft(); | this.bottomLeft = boundingBox.bottomLeft; | |||
this.topRight = boundingBox.getTopRight(); | this.topRight = boundingBox.topRight; | |||
this.bottomRight = boundingBox.getBottomRight(); | this.bottomRight = boundingBox.bottomRight; | |||
this.minX = boundingBox.getMinX(); | this.minX = boundingBox.minX; | |||
this.maxX = boundingBox.getMaxX(); | this.maxX = boundingBox.maxX; | |||
this.minY = boundingBox.getMinY(); | this.minY = boundingBox.minY; | |||
this.maxY = boundingBox.getMaxY(); | this.maxY = boundingBox.maxY; | |||
} | } | |||
static BoundingBox merge(BoundingBox leftBox, BoundingBox rightBox) throws Not FoundException { | static BoundingBox merge(BoundingBox leftBox, BoundingBox rightBox) throws Not FoundException { | |||
if (leftBox == null) { | if (leftBox == null) { | |||
return rightBox; | return rightBox; | |||
} | } | |||
if (rightBox == null) { | if (rightBox == null) { | |||
return leftBox; | return leftBox; | |||
} | } | |||
return new BoundingBox(leftBox.image, leftBox.topLeft, leftBox.bottomLeft, r ightBox.topRight, rightBox.bottomRight); | return new BoundingBox(leftBox.image, leftBox.topLeft, leftBox.bottomLeft, r ightBox.topRight, rightBox.bottomRight); | |||
End of changes. 1 change blocks. | ||||
8 lines changed or deleted | 8 lines changed or added |