(rect)
| 898 | |
| 899 | |
| 900 | def rect_to_edges(rect) -> list: |
| 901 | top, bottom, left, right = [dict(rect) for x in range(4)] |
| 902 | top.update( |
| 903 | { |
| 904 | "object_type": "rect_edge", |
| 905 | "height": 0, |
| 906 | "y0": rect["y1"], |
| 907 | "bottom": rect["top"], |
| 908 | "orientation": "h", |
| 909 | } |
| 910 | ) |
| 911 | bottom.update( |
| 912 | { |
| 913 | "object_type": "rect_edge", |
| 914 | "height": 0, |
| 915 | "y1": rect["y0"], |
| 916 | "top": rect["top"] + rect["height"], |
| 917 | "doctop": rect["doctop"] + rect["height"], |
| 918 | "orientation": "h", |
| 919 | } |
| 920 | ) |
| 921 | left.update( |
| 922 | { |
| 923 | "object_type": "rect_edge", |
| 924 | "width": 0, |
| 925 | "x1": rect["x0"], |
| 926 | "orientation": "v", |
| 927 | } |
| 928 | ) |
| 929 | right.update( |
| 930 | { |
| 931 | "object_type": "rect_edge", |
| 932 | "width": 0, |
| 933 | "x0": rect["x1"], |
| 934 | "orientation": "v", |
| 935 | } |
| 936 | ) |
| 937 | return [top, bottom, left, right] |
| 938 | |
| 939 | |
| 940 | def curve_to_edges(curve) -> list: |
nothing calls this directly
no test coverage detected
searching dependent graphs…