from
wand.image
import
Image
from
wand.drawing
import
Drawing
from
wand.color
import
Color
with Drawing() as draw:
draw.stroke_width
=
2
draw.stroke_color
=
Color(
'black'
)
draw.fill_color
=
Color(
'white'
)
draw.path_start()
draw.path_move(to
=
(
100
,
100
))
draw.path_curve_to_quadratic_bezier(to
=
(
100
,
0
),
control
=
[(
20
,
50
),(
90
,
10
)],
smooth
=
True
,relative
=
True
)
draw.path_finish()
with Image(width
=
200
, height
=
200
, background
=
Color(
'lightgreen'
)) as image:
draw(image)
image.save(filename
=
"pathbcurve.png"
)