mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-29 08:34:23 +08:00
Change "rect_bottom"/etc. obj types to "rect_edge"
This commit is contained in:
@@ -3,26 +3,26 @@ from itertools import chain
|
||||
def rect_to_edges(rect):
|
||||
top, bottom, left, right = [ dict(rect) for x in range(4) ]
|
||||
top.update({
|
||||
"object_type": "edge_top",
|
||||
"object_type": "rect_edge",
|
||||
"height": 0,
|
||||
"y0": rect["y1"],
|
||||
"orientation": "h"
|
||||
})
|
||||
bottom.update({
|
||||
"object_type": "edge_bottom",
|
||||
"object_type": "rect_edge",
|
||||
"height": 0,
|
||||
"doctop": rect["doctop"] + rect["height"],
|
||||
"y1": rect["y0"],
|
||||
"orientation": "h"
|
||||
})
|
||||
left.update({
|
||||
"object_type": "edge_left",
|
||||
"object_type": "rect_edge",
|
||||
"width": 0,
|
||||
"x1": rect["x0"],
|
||||
"orientation": "v"
|
||||
})
|
||||
right.update({
|
||||
"object_type": "edge_right",
|
||||
"object_type": "rect_edge",
|
||||
"width": 0,
|
||||
"x0": rect["x1"],
|
||||
"orientation": "v"
|
||||
|
||||
Reference in New Issue
Block a user