RED-5381: Fixed drawing of sections

This commit is contained in:
deiflaender 2022-10-20 10:20:48 +02:00
parent ad455455df
commit a37051da11

View File

@ -43,12 +43,13 @@ public class SectionGridCreatorService {
if (textBlock instanceof TextBlock) { if (textBlock instanceof TextBlock) {
TextBlock tb = (TextBlock) textBlock;
classifiedDoc.getSectionGrid() classifiedDoc.getSectionGrid()
.getRectanglesPerPage() .getRectanglesPerPage()
.computeIfAbsent(page, (x) -> new ArrayList<>()) .computeIfAbsent(page, (x) -> new ArrayList<>())
.add(new SectionRectangle(new Point(textBlock.getMinX(), textBlock.getMinY()), .add(new SectionRectangle(new Point(tb.getX1(), tb.getY1()),
textBlock.getWidth(), tb.getX2() - tb.getX1(),
textBlock.getHeight(), tb.getY2() - tb.getY1(),
i + 1, i + 1,
paragraph.getPageBlocks().size(), paragraph.getPageBlocks().size(),
null)); null));