Pull request #269: RED-2742: Fixed annotation positions for rotation = 0 and direction = 90

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

* commit 'a91877769370c804b7d9d9fa4d4e9e16752598bd':
  RED-2742: Fixed annotation positions for rotation = 0 and direction = 90
This commit is contained in:
Dominique Eiflaender 2021-11-12 10:16:52 +01:00
commit 2c6957360b
2 changed files with 7 additions and 0 deletions

View File

@ -267,6 +267,13 @@ public class TextPositionSequence implements CharSequence {
posYInit = textPositions.get(0).getPageHeight() - textPositions.get(0).getYDirAdj() - 2;
posYEnd = textPositions.get(0).getPageHeight() - textPositions.get(textPositions.size() - 1)
.getYDirAdj() + 2;
} else if(textPositions.get(0).getRotation() == 0 && textPositions.get(0).getDir() == 90f){
posYInit = getX1();
posYEnd = getX2() + textPositions.get(0)
.getWidthDirAdj() - textPositions.get(textPositions.size() - 1).getWidthDirAdj() - 3;
posXInit = textPositions.get(0).getYDirAdj() + 2;
posXEnd = textPositions.get(textPositions.size() - 1)
.getYDirAdj() - height;
}
else {
posXEnd = textPositions.get(textPositions.size() - 1)