[Image-SIG] Re: pattern fill
Fredrik Lundh
fredrik at pythonware.com
Mon Aug 23 16:29:49 CEST 2004
<sdahlbac at abo.fi> wrote:
> Have I overlooked something simple or is some kind of pattern fill not
> supported in the ImageDraw module.
>
> I'd like to draw some sort of striped pattern(s) but haven't found a
> (built in) way to do it, of course it is possible to implement such
> functionality by drawing the stripes myself, but I wanted to check if I
> missed something simpler first.
ImageDraw only supports solid fills.
as a workaround, you can create a patterned image, draw the graphics
in a separate image memory (the mask), and use
im.paste(pattern, (0, 0), mask)
to render the patterned object.
</F>
More information about the Image-SIG
mailing list