mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 20:58:11 +00:00
fix: correct y-axis scaling in draw_table_cells (#2287)
* Fix y axis
* DCO Remediation Commit for manuflexor <imanuel@flexor.ai>
I, manuflexor <imanuel@flexor.ai>, hereby add my Signed-off-by to this commit: cd56622d4f
Signed-off-by: manuflexor <imanuel@flexor.ai>
---------
Signed-off-by: manuflexor <imanuel@flexor.ai>
This commit is contained in:
@@ -121,7 +121,7 @@ class TableStructureModel(BasePageModel):
|
|||||||
|
|
||||||
for table_element in tbl_list:
|
for table_element in tbl_list:
|
||||||
x0, y0, x1, y1 = table_element.cluster.bbox.as_tuple()
|
x0, y0, x1, y1 = table_element.cluster.bbox.as_tuple()
|
||||||
y0 *= scale_x
|
y0 *= scale_y
|
||||||
y1 *= scale_y
|
y1 *= scale_y
|
||||||
x0 *= scale_x
|
x0 *= scale_x
|
||||||
x1 *= scale_x
|
x1 *= scale_x
|
||||||
@@ -132,7 +132,7 @@ class TableStructureModel(BasePageModel):
|
|||||||
x0, y0, x1, y1 = cell.rect.to_bounding_box().as_tuple()
|
x0, y0, x1, y1 = cell.rect.to_bounding_box().as_tuple()
|
||||||
x0 *= scale_x
|
x0 *= scale_x
|
||||||
x1 *= scale_x
|
x1 *= scale_x
|
||||||
y0 *= scale_x
|
y0 *= scale_y
|
||||||
y1 *= scale_y
|
y1 *= scale_y
|
||||||
|
|
||||||
draw.rectangle([(x0, y0), (x1, y1)], outline="green")
|
draw.rectangle([(x0, y0), (x1, y1)], outline="green")
|
||||||
@@ -142,7 +142,7 @@ class TableStructureModel(BasePageModel):
|
|||||||
x0, y0, x1, y1 = tc.bbox.as_tuple()
|
x0, y0, x1, y1 = tc.bbox.as_tuple()
|
||||||
x0 *= scale_x
|
x0 *= scale_x
|
||||||
x1 *= scale_x
|
x1 *= scale_x
|
||||||
y0 *= scale_x
|
y0 *= scale_y
|
||||||
y1 *= scale_y
|
y1 *= scale_y
|
||||||
|
|
||||||
if tc.column_header:
|
if tc.column_header:
|
||||||
|
|||||||
Reference in New Issue
Block a user