-
I am trying to create a pdf using the draw methods such as draw_line, draw_rect, draw_bezier. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
You must use the shape = page.new_shape()
shape.draw_rect(...)
shape.draw_bezier(...)
shape.draw_zigzag(...)
shape.finish(...) # finish first shape
shape.draw_... # draw more things
shape.finish(...) # finish second shape
...
shape.commit(overlay=True) # write to foreground of page Each draw method returns the end point of the drawing activity. Use this point as the start point of the subsequent draw. |
Beta Was this translation helpful? Give feedback.
No, you did not!
Here is the code you should have used: