Skip to content

Drawing shapes with holes ? #62

Answered by cduck
nyue asked this question in Q&A
Aug 1, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Your code is almost there. Draw both shapes in the same path.

p = draw.Path(stroke='red', stroke_width=2, fill='red', fill_rule='evenodd')
p.M(20,-20).h(200).v(-160).h(-200).Z()
p.M(80,-40).v(-100).l(100,50).Z()

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nyue
Comment options

Answer selected by cduck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants