get_drawings() is no coordinate show width and height #1065
Answered
by
JorjMcKie
zdw1011781461
asked this question in
Q&A
-
I have a need to convert the curve to SVG, I use svg package "cairocffi" |
Beta Was this translation helpful? Give feedback.
Answered by
JorjMcKie
May 30, 2021
Replies: 1 comment
-
I suppose you have figured out how to locate curves and other stuff in the output of
# a curve is a tuple ("c", p1, p2, p3, p4). The items after the "c" are points
r = fitz.Rect(p1, p1)
r |= p2
r |= p3
r |= p4
# now 'r' is the rectangle wrapping that curve. Take its width / height |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JorjMcKie
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I suppose you have figured out how to locate curves and other stuff in the output of
page.get_drawings()
.get_drawings()
is a list of Python dicts."rect"
which is the rectangle wrapping the complete path.