[Image-SIG] Bezier, or any other way to draw closed pictures made of curves?
Fredrik Lundh
fredrik@pythonware.com
Wed, 1 Sep 1999 14:13:40 +0200
Lalo Martins <lalo@webcom.com> wrote:
> The major thing I miss in ImageDraw is some way of drawing
> closed, filled pictures composed of curves (like `polygon' lets
> me draw pictures composed of straight lines). One possible way
> to do that would be simply adding a floodfill function, so I
> draw the picture with individual lines then fill it - one way,
> but not the best :-)
luckily, I managed to fix my time machine (with a little
help from Skalman), and added it to the 1.0 release.
import ImageDraw
s = ImageDraw.Outline()
s.move(0, 0)
s.curve(0, 100, 100, 100, 100, 0)
s.line(0, 0)
d = ImageDraw.Draw(im)
d.shape(s, fill=1)
this is of course highly experimental (and you may hurt
your eyes if you look at the code), so you better not
tell anyone about it... ;-)
</F>