You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any specific reason for adding the constant factor of 1 to the calculated height/width?
When converting (for example) PAGEXML to ALTO the calculated width/height of TextBlocks is always one pixel too big because of this.
The text was updated successfully, but these errors were encountered:
maxnth
changed the title
Calculation of rectangles height and width
Calculation of a rectangles height and width
Jan 28, 2020
The interpretation of a rectangle in PAGE is that both the left and right border belong to the rectangle (same with top and bottom of course).
That means if a rectangle spans from left=5 to right=8, for example, then you have:
5,6,7,8 = 4 pixels. This equals 8-5+1
I stumbled upon the following code regarding the calculation of height and width for rectangle:
prima-core-libs/java/PrimaMaths/src/org/primaresearch/maths/geometry/Rect.java
Lines 49 to 54 in d95dc0b
Is there any specific reason for adding the constant factor of 1 to the calculated height/width?
When converting (for example) PAGEXML to ALTO the calculated width/height of TextBlocks is always one pixel too big because of this.
The text was updated successfully, but these errors were encountered: