[Image-SIG] Drawing text

Denis spirou@aragne.com
Thu, 24 Aug 2000 21:08:53 +0200


Le Sun, Aug 20, 2000 at 09:19:13AM +0900, Jim Tittsler pianota:
> On Sat, Aug 19, 2000 at 11:31:01PM +0200, Denis Frère wrote:
> > What means xy in the case of an ellipse ?
> 
> I believe it is the bounding rectangle that contains the ellipse.
> 
> import Image,ImageDraw
> im = Image.new('RGB', (400,400), (0xFF,0xFF,0xFF))
> id = ImageDraw.Draw(im)
> # draw a red elipse outlined in blue that fits in (200,200) to (395,300)
> id.ellipse((200,200,395,300), fill=(0xFF,0,0), outline=(0,0,0xFF))
> im.save("test.png")

Thank you Jim.
I used colors with one big hex (0xffaacc) in place of a tuple
(thats why my colors were BGR instead of RGB) and my box was upside down.
Your few lines put me on the right way.

Could you (or someone else) send me a few lines more with a text
drawing sample ?

-- 
Denis FRERE
P3B    : Club Free-Pytho-Linuxien Caroloregien http://www.p3b.org
Aragne : Internet - Reseaux - Formations  http://www.aragne.com