Pull request #412: RED-4129: Fixed imported redactions annotations intersection calculation

Merge in RED/redaction-service from RED-4129 to master

* commit 'c7e10cefbacf8ca54c86ecba5a8598b7c9d55ce4':
  RED-4129: Fixed imported redactions annotations intersection calculation
This commit is contained in:
Dominique Eiflaender 2022-06-20 11:59:58 +02:00
commit 3269470446

View File

@ -115,7 +115,7 @@ public class ImportedRedactionService {
Point p = new Point(); Point p = new Point();
if (rectangle.getWidth() < 0) { if (rectangle.getWidth() < 0) {
p.setX(rectangle.getTopLeft().getX() - rectangle.getWidth()); p.setX(rectangle.getTopLeft().getX() + rectangle.getWidth());
r.setWidth(Math.abs(rectangle.getWidth())); r.setWidth(Math.abs(rectangle.getWidth()));
} else { } else {
p.setX(rectangle.getTopLeft().getX()); p.setX(rectangle.getTopLeft().getX());
@ -127,6 +127,7 @@ public class ImportedRedactionService {
r.setHeight(Math.abs(rectangle.getHeight())); r.setHeight(Math.abs(rectangle.getHeight()));
} else { } else {
p.setY(rectangle.getTopLeft().getY()); p.setY(rectangle.getTopLeft().getY());
r.setHeight(rectangle.getHeight());
} }
r.setTopLeft(p); r.setTopLeft(p);