[Image-SIG] aggdraw Path.curveto
Tal Leming
tal at typesupply.com
Thu Mar 9 01:57:11 CET 2006
Hi,
I'm attempting to use the aggdraw Path object and I'm running into a
problem. All of my curveto calls aren't giving me the expected
results. For example, with the code below I expect to get a curved
line, but instead I get a series of flat lines. Am I doing something
wrong?
I would appreciate any information...
Thanks,
Tal
###
import os
import Image
import aggdraw
draw = aggdraw.Draw('RGB', (100, 100), 'white')
path = aggdraw.Path()
path.moveto(0, 0)
path.curveto(0, 30, 20, 50, 50, 50)
pen = aggdraw.Pen("black", 1)
draw.path((25, 25), path, pen, None)
img = Image.fromstring('RGB', (100, 100), draw.tostring())
p = os.path.join(os.path.dirname(__file__), 'curvetoTest.tif')
img.save(p)
More information about the Image-SIG
mailing list