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

Merge in RED/redaction-service from RED-2742-backport to release/2.52.x

* commit '17fa161d7785a1d54b862376041a41ac464b6cae':
  RED-2742: Fixed annotation positions for rotation = 0 and direction = 90
This commit is contained in:
Dominique Eiflaender 2021-11-12 10:38:54 +01:00
commit dc02e58283
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)